Reviewers: Toon Verwaest,

Message:
Red only! :-)

Description:
Remove GenerateBooleanCheck() since we have a boolean map now.

Please review this at https://codereview.chromium.org/269343003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+0, -64 lines):
  M src/arm/stub-cache-arm.cc
  M src/arm64/stub-cache-arm64.cc
  M src/ia32/stub-cache-ia32.cc
  M src/mips/stub-cache-mips.cc
  M src/stub-cache.h
  M src/stub-cache.cc
  M src/x64/stub-cache-x64.cc


Index: src/arm/stub-cache-arm.cc
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc
index a8867cd6bfd18411b3bf7051050495ca0962bb11..fd53b9782d6d956cfaa99048d2217dfd2ca4c998 100644
--- a/src/arm/stub-cache-arm.cc
+++ b/src/arm/stub-cache-arm.cc
@@ -1167,19 +1167,6 @@ void LoadStubCompiler::GenerateLoadInterceptor(
 }


-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
-  Label success;
-  // Check that the object is a boolean.
-  __ LoadRoot(ip, Heap::kTrueValueRootIndex);
-  __ cmp(object, ip);
-  __ b(eq, &success);
-  __ LoadRoot(ip, Heap::kFalseValueRootIndex);
-  __ cmp(object, ip);
-  __ b(ne, miss);
-  __ bind(&success);
-}
-
-
 Handle<Code> StoreStubCompiler::CompileStoreCallback(
     Handle<JSObject> object,
     Handle<JSObject> holder,
Index: src/arm64/stub-cache-arm64.cc
diff --git a/src/arm64/stub-cache-arm64.cc b/src/arm64/stub-cache-arm64.cc
index 6a822f7c7f9a88b7216127594cbd16d716255bd2..760fbb3540991c6ae97e9a3c30cbc273ba203e6e 100644
--- a/src/arm64/stub-cache-arm64.cc
+++ b/src/arm64/stub-cache-arm64.cc
@@ -1136,19 +1136,6 @@ void LoadStubCompiler::GenerateLoadInterceptor(
 }


-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
-  UseScratchRegisterScope temps(masm());
-  // Check that the object is a boolean.
-  Register true_root = temps.AcquireX();
-  Register false_root = temps.AcquireX();
-  ASSERT(!AreAliased(object, true_root, false_root));
-  __ LoadTrueFalseRoots(true_root, false_root);
-  __ Cmp(object, true_root);
-  __ Ccmp(object, false_root, ZFlag, ne);
-  __ B(ne, miss);
-}
-
-
 Handle<Code> StoreStubCompiler::CompileStoreCallback(
     Handle<JSObject> object,
     Handle<JSObject> holder,
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index b49a8e303e08d2bc21e866c79a271872fcfd3652..adc8cd59aa9fef87c7aa1dfd6c80ce3632ff5e40 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -1177,17 +1177,6 @@ void LoadStubCompiler::GenerateLoadInterceptor(
 }


-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
-  Label success;
-  // Check that the object is a boolean.
-  __ cmp(object, factory()->true_value());
-  __ j(equal, &success);
-  __ cmp(object, factory()->false_value());
-  __ j(not_equal, miss);
-  __ bind(&success);
-}
-
-
 Handle<Code> StoreStubCompiler::CompileStoreCallback(
     Handle<JSObject> object,
     Handle<JSObject> holder,
Index: src/mips/stub-cache-mips.cc
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc
index f859d6bd23e725eaff678f2c26a9638e4175835d..abccc9496b874b8449cb768bf5a29d08c6d27dfa 100644
--- a/src/mips/stub-cache-mips.cc
+++ b/src/mips/stub-cache-mips.cc
@@ -1158,17 +1158,6 @@ void LoadStubCompiler::GenerateLoadInterceptor(
 }


-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
-  Label success;
-  // Check that the object is a boolean.
-  __ LoadRoot(at, Heap::kTrueValueRootIndex);
-  __ Branch(&success, eq, object, Operand(at));
-  __ LoadRoot(at, Heap::kFalseValueRootIndex);
-  __ Branch(miss, ne, object, Operand(at));
-  __ bind(&success);
-}
-
-
 Handle<Code> StoreStubCompiler::CompileStoreCallback(
     Handle<JSObject> object,
     Handle<JSObject> holder,
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index f83da2c5db2700096d4ee5f31b626797b1382d73..6bf209bc0aa2089b57452067ab5ebf10fc267771 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -784,9 +784,6 @@ Register LoadStubCompiler::HandlerFrontendHeader(
   } else if (type->Is(HeapType::Number())) {
     function_index = Context::NUMBER_FUNCTION_INDEX;
   } else if (type->Is(HeapType::Boolean())) {
- // Booleans use the generic oddball map, so an additional check is needed to
-    // ensure the receiver is really a boolean.
-    GenerateBooleanCheck(object_reg, miss);
     function_index = Context::BOOLEAN_FUNCTION_INDEX;
   } else {
     check_type = SKIP_RECEIVER;
Index: src/stub-cache.h
diff --git a/src/stub-cache.h b/src/stub-cache.h
index 8f92149aa65fd45b8ead4719f0e9718c0193b735..707df6c7bbbb62a256a7cd9035557de3092784f7 100644
--- a/src/stub-cache.h
+++ b/src/stub-cache.h
@@ -376,8 +376,6 @@ class StubCompiler BASE_EMBEDDED {
                            Label* miss,
                            PrototypeCheckType check = CHECK_ALL_MAPS);

-  void GenerateBooleanCheck(Register object, Label* miss);
-
   static void GenerateFastApiCall(MacroAssembler* masm,
                                   const CallOptimization& optimization,
                                   Handle<Map> receiver_map,
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index 04c2ac955f4fd70b87520568b3b34c0d5a2bcde9..537f41235179452ca14c84235840a73e8083cb5f 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -1075,17 +1075,6 @@ void LoadStubCompiler::GenerateLoadInterceptor(
 }


-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
-  Label success;
-  // Check that the object is a boolean.
-  __ Cmp(object, factory()->true_value());
-  __ j(equal, &success);
-  __ Cmp(object, factory()->false_value());
-  __ j(not_equal, miss);
-  __ bind(&success);
-}
-
-
 Handle<Code> StoreStubCompiler::CompileStoreCallback(
     Handle<JSObject> object,
     Handle<JSObject> holder,


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to