| Index: src/arm/code-stubs-arm.cc
|
| diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
|
| index 3f5660a914120b3b4e728bfc0869d3ffe83ece33..a20610754006737b00b7312c11bef17a260dc885 100644
|
| --- a/src/arm/code-stubs-arm.cc
|
| +++ b/src/arm/code-stubs-arm.cc
|
| @@ -63,6 +63,10 @@ void TransitionElementsKindStub::InitializeInterfaceDescriptor(
|
|
|
| static void InitializeArrayConstructorDescriptor(Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| + // register state
|
| + // r1 -- constructor function
|
| + // r2 -- type info cell with elements kind
|
| + // r0 -- number of arguments to the constructor function
|
| static Register registers[] = { r1, r2 };
|
| descriptor->register_param_count_ = 2;
|
| // stack param count needs (constructor pointer, and single argument)
|
| @@ -5639,20 +5643,12 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
| TypeFeedbackCells::MonomorphicArraySentinel(LAST_FAST_ELEMENTS_KIND);
|
| __ cmp(r3, Operand(terminal_kind_sentinel));
|
| __ b(ne, &miss);
|
| - // Load the global or builtins object from the current context
|
| - __ ldr(r3, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| - __ ldr(r3, FieldMemOperand(r3, GlobalObject::kGlobalContextOffset));
|
| // Make sure the function is the Array() function
|
| - __ ldr(r3,
|
| - MemOperand(r3, Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
|
| + __ LoadArrayFunction(r3);
|
| __ cmp(r1, r3);
|
| - Label megamorphic_pre;
|
| - __ b(ne, &megamorphic_pre);
|
| + __ b(ne, &megamorphic);
|
| __ jmp(&done);
|
|
|
| - __ bind(&megamorphic_pre);
|
| - __ jmp(&megamorphic);
|
| -
|
| __ bind(&miss);
|
|
|
| // A monomorphic miss (i.e, here the cache is not uninitialized) goes
|
| @@ -5668,11 +5664,8 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
| // An uninitialized cache is patched with the function or sentinel to
|
| // indicate the ElementsKind if function is the Array constructor.
|
| __ bind(&initialize);
|
| - __ ldr(r3, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| - __ ldr(r3, FieldMemOperand(r3, GlobalObject::kGlobalContextOffset));
|
| - __ ldr(r3,
|
| - MemOperand(r3, Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
|
| // Make sure the function is the Array() function
|
| + __ LoadArrayFunction(r3);
|
| __ cmp(r1, r3);
|
| __ b(ne, ¬_array_function);
|
|
|
|
|