| Index: src/mips/code-stubs-mips.cc
|
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
|
| index 18b7dffd26d368a898bcfdafd8e94cc33dfd20c4..47f052fe7db5d930105dd29acf757a575c611825 100644
|
| --- a/src/mips/code-stubs-mips.cc
|
| +++ b/src/mips/code-stubs-mips.cc
|
| @@ -444,6 +444,26 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
|
| descriptor->register_params_ = registers;
|
| descriptor->param_representations_ = representations;
|
| }
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::ApiFunctionCall);
|
| + static Register registers[] = { a0, // callee
|
| + t0, // call_data
|
| + a2, // holder
|
| + a1, // 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;
|
| + }
|
| }
|
|
|
|
|
| @@ -5561,8 +5581,7 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
|
| // -- a0 : callee
|
| // -- t0 : call_data
|
| // -- a2 : holder
|
| - // -- a3 : api_function_address
|
| - // -- a1 : thunk_arg
|
| + // -- a1 : api_function_address
|
| // -- cp : context
|
| // --
|
| // -- sp[0] : last argument
|
| @@ -5574,8 +5593,7 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
|
| Register callee = a0;
|
| Register call_data = t0;
|
| Register holder = a2;
|
| - Register api_function_address = a3;
|
| - Register thunk_arg = a1;
|
| + Register api_function_address = a1;
|
| Register context = cp;
|
|
|
| int argc = ArgumentBits::decode(bit_field_);
|
| @@ -5621,7 +5639,7 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
|
| FrameScope frame_scope(masm, StackFrame::MANUAL);
|
| __ EnterExitFrame(false, kApiStackSpace);
|
|
|
| - ASSERT(!thunk_arg.is(a0) && !api_function_address.is(a0) && !scratch.is(a0));
|
| + ASSERT(!api_function_address.is(a0) && !scratch.is(a0));
|
| // a0 = FunctionCallbackInfo&
|
| // Arguments is after the return address.
|
| __ Addu(a0, sp, Operand(1 * kPointerSize));
|
| @@ -5651,7 +5669,6 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
|
|
|
| __ CallApiFunctionAndReturn(api_function_address,
|
| thunk_ref,
|
| - thunk_arg,
|
| kStackUnwindSpace,
|
| return_value_operand,
|
| restore_context ?
|
| @@ -5659,6 +5676,44 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| +void CallApiGetterStub::Generate(MacroAssembler* masm) {
|
| + // ----------- S t a t e -------------
|
| + // -- sp[0] : name
|
| + // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object
|
| + // -- ...
|
| + // -- a2 : api_function_address
|
| + // -----------------------------------
|
| +
|
| + Register api_function_address = a2;
|
| +
|
| + __ mov(a0, sp); // a0 = Handle<Name>
|
| + __ Addu(a1, a0, Operand(1 * kPointerSize)); // a1 = PCA
|
| +
|
| + const int kApiStackSpace = 1;
|
| + FrameScope frame_scope(masm, StackFrame::MANUAL);
|
| + __ EnterExitFrame(false, kApiStackSpace);
|
| +
|
| + // Create PropertyAccessorInfo instance on the stack above the exit frame with
|
| + // a1 (internal::Object** args_) as the data.
|
| + __ sw(a1, MemOperand(sp, 1 * kPointerSize));
|
| + __ Addu(a1, sp, Operand(1 * kPointerSize)); // a1 = AccessorInfo&
|
| +
|
| + const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
|
| +
|
| + Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback);
|
| + ExternalReference::Type thunk_type =
|
| + ExternalReference::PROFILING_GETTER_CALL;
|
| + ApiFunction thunk_fun(thunk_address);
|
| + ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
|
| + masm->isolate());
|
| + __ CallApiFunctionAndReturn(api_function_address,
|
| + thunk_ref,
|
| + kStackUnwindSpace,
|
| + MemOperand(fp, 6 * kPointerSize),
|
| + NULL);
|
| +}
|
| +
|
| +
|
| #undef __
|
|
|
| } } // namespace v8::internal
|
|
|