From: bmeurer@chromium.org Date: Wed, 7 May 2014 12:18:23 +0000 (+0000) Subject: Remove GenerateBooleanCheck() since we have a boolean map now. X-Git-Tag: upstream/4.7.83~9232 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=066955e45236c8388be1bad8437ac085a5b5958a;p=platform%2Fupstream%2Fv8.git Remove GenerateBooleanCheck() since we have a boolean map now. R=verwaest@chromium.org Review URL: https://codereview.chromium.org/269343003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc index a8867cd..fd53b97 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 StoreStubCompiler::CompileStoreCallback( Handle object, Handle holder, diff --git a/src/arm64/stub-cache-arm64.cc b/src/arm64/stub-cache-arm64.cc index 6a822f7..760fbb3 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 StoreStubCompiler::CompileStoreCallback( Handle object, Handle holder, diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc index b49a8e3..adc8cd5 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 StoreStubCompiler::CompileStoreCallback( Handle object, Handle holder, diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc index f859d6b..abccc94 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 StoreStubCompiler::CompileStoreCallback( Handle object, Handle holder, diff --git a/src/stub-cache.cc b/src/stub-cache.cc index f83da2c..6bf209b 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; diff --git a/src/stub-cache.h b/src/stub-cache.h index 8f92149..707df6c 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 receiver_map, diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 04c2ac9..537f412 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 StoreStubCompiler::CompileStoreCallback( Handle object, Handle holder,