Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index 3c18ac9066befae055e4a530ddca6793f3f7bd33..9729f59cc9977b924a6e772bf497ac3438126484 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -3214,97 +3214,6 @@ void FullCodeGenerator::EmitIsSimdValue(CallRuntime* expr) { |
} |
-void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( |
- CallRuntime* expr) { |
- ZoneList<Expression*>* args = expr->arguments(); |
- DCHECK(args->length() == 1); |
- |
- VisitForAccumulatorValue(args->at(0)); |
- |
- Label materialize_true, materialize_false, skip_lookup; |
- Label* if_true = NULL; |
- Label* if_false = NULL; |
- Label* fall_through = NULL; |
- context()->PrepareTest(&materialize_true, &materialize_false, |
- &if_true, &if_false, &fall_through); |
- |
- __ AssertNotSmi(eax); |
- |
- // Check whether this map has already been checked to be safe for default |
- // valueOf. |
- __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); |
- __ test_b(FieldOperand(ebx, Map::kBitField2Offset), |
- 1 << Map::kStringWrapperSafeForDefaultValueOf); |
- __ j(not_zero, &skip_lookup); |
- |
- // Check for fast case object. Return false for slow case objects. |
- __ mov(ecx, FieldOperand(eax, JSObject::kPropertiesOffset)); |
- __ mov(ecx, FieldOperand(ecx, HeapObject::kMapOffset)); |
- __ cmp(ecx, isolate()->factory()->hash_table_map()); |
- __ j(equal, if_false); |
- |
- // Look for valueOf string in the descriptor array, and indicate false if |
- // found. Since we omit an enumeration index check, if it is added via a |
- // transition that shares its descriptor array, this is a false positive. |
- Label entry, loop, done; |
- |
- // Skip loop if no descriptors are valid. |
- __ NumberOfOwnDescriptors(ecx, ebx); |
- __ cmp(ecx, 0); |
- __ j(equal, &done); |
- |
- __ LoadInstanceDescriptors(ebx, ebx); |
- // ebx: descriptor array. |
- // ecx: valid entries in the descriptor array. |
- // Calculate the end of the descriptor array. |
- STATIC_ASSERT(kSmiTag == 0); |
- STATIC_ASSERT(kSmiTagSize == 1); |
- STATIC_ASSERT(kPointerSize == 4); |
- __ imul(ecx, ecx, DescriptorArray::kDescriptorSize); |
- __ lea(ecx, Operand(ebx, ecx, times_4, DescriptorArray::kFirstOffset)); |
- // Calculate location of the first key name. |
- __ add(ebx, Immediate(DescriptorArray::kFirstOffset)); |
- // Loop through all the keys in the descriptor array. If one of these is the |
- // internalized string "valueOf" the result is false. |
- __ jmp(&entry); |
- __ bind(&loop); |
- __ mov(edx, FieldOperand(ebx, 0)); |
- __ cmp(edx, isolate()->factory()->valueOf_string()); |
- __ j(equal, if_false); |
- __ add(ebx, Immediate(DescriptorArray::kDescriptorSize * kPointerSize)); |
- __ bind(&entry); |
- __ cmp(ebx, ecx); |
- __ j(not_equal, &loop); |
- |
- __ bind(&done); |
- |
- // Reload map as register ebx was used as temporary above. |
- __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); |
- |
- // Set the bit in the map to indicate that there is no local valueOf field. |
- __ or_(FieldOperand(ebx, Map::kBitField2Offset), |
- Immediate(1 << Map::kStringWrapperSafeForDefaultValueOf)); |
- |
- __ bind(&skip_lookup); |
- |
- // If a valueOf property is not found on the object check that its |
- // prototype is the un-modified String prototype. If not result is false. |
- __ mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); |
- __ JumpIfSmi(ecx, if_false); |
- __ mov(ecx, FieldOperand(ecx, HeapObject::kMapOffset)); |
- __ mov(edx, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
- __ mov(edx, |
- FieldOperand(edx, GlobalObject::kNativeContextOffset)); |
- __ cmp(ecx, |
- ContextOperand(edx, |
- Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX)); |
- PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
- Split(equal, if_true, if_false, fall_through); |
- |
- context()->Plug(if_true, if_false); |
-} |
- |
- |
void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 1); |