| Index: src/full-codegen/mips/full-codegen-mips.cc
|
| diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
|
| index 2e3cb94f71a359bd38cb081211b3f34d6367c7da..1bf21f085b2adfd9c50317ac4ef374437af15550 100644
|
| --- a/src/full-codegen/mips/full-codegen-mips.cc
|
| +++ b/src/full-codegen/mips/full-codegen-mips.cc
|
| @@ -3318,94 +3318,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(v0);
|
| -
|
| - __ lw(a1, FieldMemOperand(v0, HeapObject::kMapOffset));
|
| - __ lbu(t0, FieldMemOperand(a1, Map::kBitField2Offset));
|
| - __ And(t0, t0, 1 << Map::kStringWrapperSafeForDefaultValueOf);
|
| - __ Branch(&skip_lookup, ne, t0, Operand(zero_reg));
|
| -
|
| - // Check for fast case object. Generate false result for slow case object.
|
| - __ lw(a2, FieldMemOperand(v0, JSObject::kPropertiesOffset));
|
| - __ lw(a2, FieldMemOperand(a2, HeapObject::kMapOffset));
|
| - __ LoadRoot(t0, Heap::kHashTableMapRootIndex);
|
| - __ Branch(if_false, eq, a2, Operand(t0));
|
| -
|
| - // Look for valueOf name 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(a3, a1);
|
| - __ Branch(&done, eq, a3, Operand(zero_reg));
|
| -
|
| - __ LoadInstanceDescriptors(a1, t0);
|
| - // t0: descriptor array.
|
| - // a3: valid entries in the descriptor array.
|
| - STATIC_ASSERT(kSmiTag == 0);
|
| - STATIC_ASSERT(kSmiTagSize == 1);
|
| - STATIC_ASSERT(kPointerSize == 4);
|
| - __ li(at, Operand(DescriptorArray::kDescriptorSize));
|
| - __ Mul(a3, a3, at);
|
| - // Calculate location of the first key name.
|
| - __ Addu(t0, t0, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag));
|
| - // Calculate the end of the descriptor array.
|
| - __ mov(a2, t0);
|
| - __ sll(t1, a3, kPointerSizeLog2);
|
| - __ Addu(a2, a2, t1);
|
| -
|
| - // Loop through all the keys in the descriptor array. If one of these is the
|
| - // string "valueOf" the result is false.
|
| - // The use of t2 to store the valueOf string assumes that it is not otherwise
|
| - // used in the loop below.
|
| - __ LoadRoot(t2, Heap::kvalueOf_stringRootIndex);
|
| - __ jmp(&entry);
|
| - __ bind(&loop);
|
| - __ lw(a3, MemOperand(t0, 0));
|
| - __ Branch(if_false, eq, a3, Operand(t2));
|
| - __ Addu(t0, t0, Operand(DescriptorArray::kDescriptorSize * kPointerSize));
|
| - __ bind(&entry);
|
| - __ Branch(&loop, ne, t0, Operand(a2));
|
| -
|
| - __ bind(&done);
|
| -
|
| - // Set the bit in the map to indicate that there is no local valueOf field.
|
| - __ lbu(a2, FieldMemOperand(a1, Map::kBitField2Offset));
|
| - __ Or(a2, a2, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf));
|
| - __ sb(a2, FieldMemOperand(a1, Map::kBitField2Offset));
|
| -
|
| - __ 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.
|
| - __ lw(a2, FieldMemOperand(a1, Map::kPrototypeOffset));
|
| - __ JumpIfSmi(a2, if_false);
|
| - __ lw(a2, FieldMemOperand(a2, HeapObject::kMapOffset));
|
| - __ lw(a3, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX));
|
| - __ lw(a3, FieldMemOperand(a3, GlobalObject::kNativeContextOffset));
|
| - __ lw(a3, ContextOperand(a3, Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX));
|
| - PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
|
| - Split(eq, a2, Operand(a3), 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);
|
|
|