| Index: src/arm/builtins-arm.cc
|
| diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc
|
| index ebb9e1235f089619e461d268d4521ae5f24ba8d9..3cc2797e94b675d6b3741d60ced738dc65d1cd21 100644
|
| --- a/src/arm/builtins-arm.cc
|
| +++ b/src/arm/builtins-arm.cc
|
| @@ -306,8 +306,7 @@ static void AllocateJSArray(MacroAssembler* masm,
|
| // entering the generic code. In both cases argc in r0 needs to be preserved.
|
| // Both registers are preserved by this code so no need to differentiate between
|
| // construct call and normal call.
|
| -static void ArrayNativeCode(MacroAssembler* masm,
|
| - Label* call_generic_code) {
|
| +void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code) {
|
| Counters* counters = masm->isolate()->counters();
|
| Label argc_one_or_more, argc_two_or_more, not_empty_array, empty_array,
|
| has_non_smi_element, finish, cant_transition_map, not_double;
|
| @@ -532,7 +531,7 @@ void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
|
| +void Builtins::Generate_CommonArrayConstructCode(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- r0 : number of arguments
|
| // -- r1 : constructor function
|
| @@ -550,51 +549,17 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
|
| __ Assert(ne, "Unexpected initial map for Array function");
|
| __ CompareObjectType(r3, r3, r4, MAP_TYPE);
|
| __ Assert(eq, "Unexpected initial map for Array function");
|
| -
|
| - if (FLAG_optimize_constructed_arrays) {
|
| - // We should either have undefined in r2 or a valid jsglobalpropertycell
|
| - Label okay_here;
|
| - Handle<Object> undefined_sentinel(
|
| - masm->isolate()->heap()->undefined_value(), masm->isolate());
|
| - Handle<Map> global_property_cell_map(
|
| - masm->isolate()->heap()->global_property_cell_map());
|
| - __ cmp(r2, Operand(undefined_sentinel));
|
| - __ b(eq, &okay_here);
|
| - __ ldr(r3, FieldMemOperand(r2, 0));
|
| - __ cmp(r3, Operand(global_property_cell_map));
|
| - __ Assert(eq, "Expected property cell in register ebx");
|
| - __ bind(&okay_here);
|
| - }
|
| - }
|
| -
|
| - if (FLAG_optimize_constructed_arrays) {
|
| - Label not_zero_case, not_one_case;
|
| - __ tst(r0, r0);
|
| - __ b(ne, ¬_zero_case);
|
| - ArrayNoArgumentConstructorStub no_argument_stub;
|
| - __ TailCallStub(&no_argument_stub);
|
| -
|
| - __ bind(¬_zero_case);
|
| - __ cmp(r0, Operand(1));
|
| - __ b(gt, ¬_one_case);
|
| - ArraySingleArgumentConstructorStub single_argument_stub;
|
| - __ TailCallStub(&single_argument_stub);
|
| -
|
| - __ bind(¬_one_case);
|
| - ArrayNArgumentsConstructorStub n_argument_stub;
|
| - __ TailCallStub(&n_argument_stub);
|
| - } else {
|
| - Label generic_constructor;
|
| - // Run the native code for the Array function called as a constructor.
|
| - ArrayNativeCode(masm, &generic_constructor);
|
| -
|
| - // Jump to the generic construct code in case the specialized code cannot
|
| - // handle the construction.
|
| - __ bind(&generic_constructor);
|
| - Handle<Code> generic_construct_stub =
|
| - masm->isolate()->builtins()->JSConstructStubGeneric();
|
| - __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
|
| }
|
| + Label generic_constructor;
|
| + // Run the native code for the Array function called as a constructor.
|
| + ArrayNativeCode(masm, &generic_constructor);
|
| +
|
| + // Jump to the generic construct code in case the specialized code cannot
|
| + // handle the construction.
|
| + __ bind(&generic_constructor);
|
| + Handle<Code> generic_construct_stub =
|
| + masm->isolate()->builtins()->JSConstructStubGeneric();
|
| + __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
|
| }
|
|
|
|
|
|
|