| Index: src/mips/code-stubs-mips.cc
|
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
|
| index f6c47b24f523b541278f8bc082f2c55c5ea031ab..c3d5661919049fcffb66e7234b03ccec000fce85 100644
|
| --- a/src/mips/code-stubs-mips.cc
|
| +++ b/src/mips/code-stubs-mips.cc
|
| @@ -2882,7 +2882,6 @@
|
| // -- ...
|
| // -- sp[(argc - 1)* 4] : first argument
|
| // -- sp[argc * 4] : receiver
|
| - // -- sp[(argc + 1)* 4] : accessor_holder
|
| // -----------------------------------
|
|
|
| Register callee = a0;
|
| @@ -2908,6 +2907,10 @@
|
|
|
| // Save context, callee and call data.
|
| __ Push(context, callee, call_data);
|
| + if (!is_lazy()) {
|
| + // Load context from callee.
|
| + __ lw(context, FieldMemOperand(callee, JSFunction::kContextOffset));
|
| + }
|
|
|
| Register scratch = call_data;
|
| __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
|
| @@ -2916,20 +2919,6 @@
|
| __ li(scratch, Operand(ExternalReference::isolate_address(masm->isolate())));
|
| // Push isolate and holder.
|
| __ Push(scratch, holder);
|
| -
|
| - // Enter a new context
|
| - if (is_lazy()) {
|
| - // Load context from accessor_holder
|
| - Register accessor_holder = context;
|
| - __ lw(accessor_holder,
|
| - MemOperand(sp, (FCA::kArgsLength + 1 + argc()) * kPointerSize));
|
| - __ lw(scratch, FieldMemOperand(accessor_holder, HeapObject::kMapOffset));
|
| - __ GetMapConstructor(scratch, scratch, context, callee);
|
| - __ lw(context, FieldMemOperand(scratch, JSFunction::kContextOffset));
|
| - } else {
|
| - // Load context from callee.
|
| - __ lw(context, FieldMemOperand(callee, JSFunction::kContextOffset));
|
| - }
|
|
|
| // Prepare arguments.
|
| __ mov(scratch, sp);
|
| @@ -2968,9 +2957,11 @@
|
| return_value_offset = 2 + FCA::kReturnValueOffset;
|
| }
|
| MemOperand return_value_operand(fp, return_value_offset * kPointerSize);
|
| - const int stack_space = argc() + FCA::kArgsLength + 2;
|
| + int stack_space = 0;
|
| + int32_t stack_space_offset = 3 * kPointerSize;
|
| + stack_space = argc() + FCA::kArgsLength + 1;
|
| // TODO(adamk): Why are we clobbering this immediately?
|
| - const int32_t stack_space_offset = kInvalidStackOffset;
|
| + stack_space_offset = kInvalidStackOffset;
|
| CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
|
| stack_space_offset, return_value_operand,
|
| &context_restore_operand);
|
|
|