| Index: src/arm/stub-cache-arm.cc
|
| diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc
|
| index 0ccb28b7cd6a5a1148374883267193f1bf068d41..ae44819948a5bb3b0597eb7ab22d8843845c43ea 100644
|
| --- a/src/arm/stub-cache-arm.cc
|
| +++ b/src/arm/stub-cache-arm.cc
|
| @@ -351,60 +351,6 @@ void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm,
|
| }
|
|
|
|
|
| -// Generate code to check if an object is a string. If the object is a
|
| -// heap object, its map's instance type is left in the scratch1 register.
|
| -// If this is not needed, scratch1 and scratch2 may be the same register.
|
| -static void GenerateStringCheck(MacroAssembler* masm,
|
| - Register receiver,
|
| - Register scratch1,
|
| - Register scratch2,
|
| - Label* smi,
|
| - Label* non_string_object) {
|
| - // Check that the receiver isn't a smi.
|
| - __ JumpIfSmi(receiver, smi);
|
| -
|
| - // Check that the object is a string.
|
| - __ ldr(scratch1, FieldMemOperand(receiver, HeapObject::kMapOffset));
|
| - __ ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
|
| - __ and_(scratch2, scratch1, Operand(kIsNotStringMask));
|
| - // The cast is to resolve the overload for the argument of 0x0.
|
| - __ cmp(scratch2, Operand(static_cast<int32_t>(kStringTag)));
|
| - __ b(ne, non_string_object);
|
| -}
|
| -
|
| -
|
| -// Generate code to load the length from a string object and return the length.
|
| -// If the receiver object is not a string or a wrapped string object the
|
| -// execution continues at the miss label. The register containing the
|
| -// receiver is potentially clobbered.
|
| -void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm,
|
| - Register receiver,
|
| - Register scratch1,
|
| - Register scratch2,
|
| - Label* miss) {
|
| - Label check_wrapper;
|
| -
|
| - // Check if the object is a string leaving the instance type in the
|
| - // scratch1 register.
|
| - GenerateStringCheck(masm, receiver, scratch1, scratch2, miss, &check_wrapper);
|
| -
|
| - // Load length directly from the string.
|
| - __ ldr(r0, FieldMemOperand(receiver, String::kLengthOffset));
|
| - __ Ret();
|
| -
|
| - // Check if the object is a JSValue wrapper.
|
| - __ bind(&check_wrapper);
|
| - __ cmp(scratch1, Operand(JS_VALUE_TYPE));
|
| - __ b(ne, miss);
|
| -
|
| - // Unwrap the value and check if the wrapped value is a string.
|
| - __ ldr(scratch1, FieldMemOperand(receiver, JSValue::kValueOffset));
|
| - GenerateStringCheck(masm, scratch1, scratch2, scratch2, miss, miss);
|
| - __ ldr(r0, FieldMemOperand(scratch1, String::kLengthOffset));
|
| - __ Ret();
|
| -}
|
| -
|
| -
|
| void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm,
|
| Register receiver,
|
| Register scratch1,
|
|
|