| Index: src/mips/code-stubs-mips.cc
|
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
|
| index 68b0c5fa679c63f14429725434568e354739510b..b536209c1952fcaf02594f4269bb7105de5f27c9 100644
|
| --- a/src/mips/code-stubs-mips.cc
|
| +++ b/src/mips/code-stubs-mips.cc
|
| @@ -5861,6 +5861,7 @@ void StringAddStub::GenerateConvertArgument(MacroAssembler* masm,
|
| __ Branch(&done, lt, scratch1, Operand(FIRST_NONSTRING_TYPE));
|
|
|
| // Check the number to string cache.
|
| + Label not_cached;
|
| __ bind(¬_string);
|
| // Puts the cached result into scratch1.
|
| NumberToStringStub::GenerateLookupNumberStringCache(masm,
|
| @@ -5869,9 +5870,23 @@ void StringAddStub::GenerateConvertArgument(MacroAssembler* masm,
|
| scratch2,
|
| scratch3,
|
| scratch4,
|
| - slow);
|
| + ¬_cached);
|
| __ mov(arg, scratch1);
|
| __ sw(arg, MemOperand(sp, stack_offset));
|
| + __ jmp(&done);
|
| +
|
| + // Check if the argument is a safe string wrapper.
|
| + __ bind(¬_cached);
|
| + __ JumpIfSmi(arg, slow);
|
| + __ GetObjectType(arg, scratch1, scratch2); // map -> scratch1.
|
| + __ Branch(slow, ne, scratch2, Operand(JS_VALUE_TYPE));
|
| + __ lbu(scratch2, FieldMemOperand(scratch1, Map::kBitField2Offset));
|
| + __ li(scratch4, 1 << Map::kStringWrapperSafeForDefaultValueOf);
|
| + __ And(scratch2, scratch2, scratch4);
|
| + __ Branch(slow, ne, scratch2, Operand(scratch4));
|
| + __ lw(arg, FieldMemOperand(arg, JSValue::kValueOffset));
|
| + __ sw(arg, MemOperand(sp, stack_offset));
|
| +
|
| __ bind(&done);
|
| }
|
|
|
|
|