Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index e5471fd540b2272f5c99209c5edbf9b8b7f39a11..dca27bb50c43ec11f9abdc72a6ba71b67ccff294 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -442,6 +442,27 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
descriptor->param_representations_ = representations; |
descriptor->platform_specific_descriptor_ = &default_descriptor; |
} |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(Isolate::ApiFunctionCall); |
+ static Register registers[] = { r0, // callee |
+ r4, // call_data |
+ r2, // holder |
+ r1, // api_function_address |
+ cp, // context |
+ }; |
+ static Representation representations[] = { |
+ Representation::Tagged(), // callee |
+ Representation::Tagged(), // call_data |
+ Representation::Tagged(), // holder |
+ Representation::External(), // api_function_address |
+ Representation::Tagged(), // context |
+ }; |
+ descriptor->register_param_count_ = 5; |
+ descriptor->register_params_ = registers; |
+ descriptor->param_representations_ = representations; |
+ descriptor->platform_specific_descriptor_ = &default_descriptor; |
+ } |
} |
@@ -5458,8 +5479,7 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) { |
// -- r0 : callee |
// -- r4 : call_data |
// -- r2 : holder |
- // -- r3 : api_function_address |
- // -- r1 : thunk_arg |
+ // -- r1 : api_function_address |
// -- cp : context |
// -- |
// -- esp[0] : last argument |
@@ -5471,8 +5491,7 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) { |
Register callee = r0; |
Register call_data = r4; |
Register holder = r2; |
- Register api_function_address = r3; |
- Register thunk_arg = r1; |
+ Register api_function_address = r1; |
Register context = cp; |
int argc = ArgumentBits::decode(bit_field_); |
@@ -5528,7 +5547,7 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) { |
FrameScope frame_scope(masm, StackFrame::MANUAL); |
__ EnterExitFrame(false, kApiStackSpace); |
- ASSERT(!thunk_arg.is(r0) && !api_function_address.is(r0) && !scratch.is(r0)); |
+ ASSERT(!api_function_address.is(r0) && !scratch.is(r0)); |
// r0 = FunctionCallbackInfo& |
// Arguments is after the return address. |
__ add(r0, sp, Operand(1 * kPointerSize)); |
@@ -5559,7 +5578,6 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) { |
__ CallApiFunctionAndReturn(api_function_address, |
thunk_ref, |
- thunk_arg, |
kStackUnwindSpace, |
return_value_operand, |
restore_context ? |