| Index: src/arm/code-stubs-arm.cc
|
| diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
|
| index 9330eb1411723a56ba45f529d2a0d99eef1c7edf..94e114fef94c69976f097a058e5067b6365b6dd6 100644
|
| --- a/src/arm/code-stubs-arm.cc
|
| +++ b/src/arm/code-stubs-arm.cc
|
| @@ -77,7 +77,7 @@ void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
|
| descriptor->register_param_count_ = 3;
|
| descriptor->register_params_ = registers;
|
| descriptor->deoptimization_handler_ =
|
| - Runtime::FunctionForId(Runtime::kCreateArrayLiteralShallow)->entry;
|
| + Runtime::FunctionForId(Runtime::kCreateArrayLiteral)->entry;
|
| }
|
|
|
|
|
| @@ -189,14 +189,21 @@ static void InitializeArrayConstructorDescriptor(
|
| // r0 -- number of arguments
|
| // r1 -- function
|
| // r2 -- type info cell with elements kind
|
| - static Register registers[] = { r1, r2 };
|
| - descriptor->register_param_count_ = 2;
|
| - if (constant_stack_parameter_count != 0) {
|
| + static Register registers_variable_args[] = { r1, r2, r0 };
|
| + static Register registers_no_args[] = { r1, r2 };
|
| +
|
| + if (constant_stack_parameter_count == 0) {
|
| + descriptor->register_param_count_ = 2;
|
| + descriptor->register_params_ = registers_no_args;
|
| + } else {
|
| // stack param count needs (constructor pointer, and single argument)
|
| + descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
|
| descriptor->stack_parameter_count_ = r0;
|
| + descriptor->register_param_count_ = 3;
|
| + descriptor->register_params_ = registers_variable_args;
|
| }
|
| +
|
| descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
|
| - descriptor->register_params_ = registers;
|
| descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
|
| descriptor->deoptimization_handler_ =
|
| Runtime::FunctionForId(Runtime::kArrayConstructor)->entry;
|
| @@ -210,15 +217,21 @@ static void InitializeInternalArrayConstructorDescriptor(
|
| // register state
|
| // r0 -- number of arguments
|
| // r1 -- constructor function
|
| - static Register registers[] = { r1 };
|
| - descriptor->register_param_count_ = 1;
|
| + static Register registers_variable_args[] = { r1, r0 };
|
| + static Register registers_no_args[] = { r1 };
|
|
|
| - if (constant_stack_parameter_count != 0) {
|
| + if (constant_stack_parameter_count == 0) {
|
| + descriptor->register_param_count_ = 1;
|
| + descriptor->register_params_ = registers_no_args;
|
| + } else {
|
| // stack param count needs (constructor pointer, and single argument)
|
| + descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
|
| descriptor->stack_parameter_count_ = r0;
|
| + descriptor->register_param_count_ = 2;
|
| + descriptor->register_params_ = registers_variable_args;
|
| }
|
| +
|
| descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
|
| - descriptor->register_params_ = registers;
|
| descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
|
| descriptor->deoptimization_handler_ =
|
| Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry;
|
| @@ -302,6 +315,17 @@ void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor(
|
| }
|
|
|
|
|
| +void NewStringAddStub::InitializeInterfaceDescriptor(
|
| + Isolate* isolate,
|
| + CodeStubInterfaceDescriptor* descriptor) {
|
| + static Register registers[] = { r1, r0 };
|
| + descriptor->register_param_count_ = 2;
|
| + descriptor->register_params_ = registers;
|
| + descriptor->deoptimization_handler_ =
|
| + Runtime::FunctionForId(Runtime::kStringAdd)->entry;
|
| +}
|
| +
|
| +
|
| #define __ ACCESS_MASM(masm)
|
|
|
|
|
| @@ -3344,16 +3368,12 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
|
|
| // Arguments register must be smi-tagged to call out.
|
| __ SmiTag(r0);
|
| - __ push(r0);
|
| - __ push(r1);
|
| - __ push(r2);
|
| + __ Push(r2, r1, r0);
|
|
|
| CreateAllocationSiteStub create_stub;
|
| __ CallStub(&create_stub);
|
|
|
| - __ pop(r2);
|
| - __ pop(r1);
|
| - __ pop(r0);
|
| + __ Pop(r2, r1, r0);
|
| __ SmiUntag(r0);
|
| }
|
| __ b(&done);
|
| @@ -5021,8 +5041,7 @@ void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
|
|
|
| FrameScope scope(masm, StackFrame::INTERNAL);
|
| __ Push(r1, r0);
|
| - __ push(lr);
|
| - __ Push(r1, r0);
|
| + __ Push(lr, r1, r0);
|
| __ mov(ip, Operand(Smi::FromInt(op_)));
|
| __ push(ip);
|
| __ CallExternalReference(miss, 3);
|
| @@ -5030,8 +5049,7 @@ void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
|
| __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag));
|
| // Restore registers.
|
| __ pop(lr);
|
| - __ pop(r0);
|
| - __ pop(r1);
|
| + __ Pop(r1, r0);
|
| }
|
|
|
| __ Jump(r2);
|
|
|