| Index: src/s390/code-stubs-s390.cc
|
| diff --git a/src/s390/code-stubs-s390.cc b/src/s390/code-stubs-s390.cc
|
| index cb8154e5ff416d0db24dee3dc251dd47079c1e59..533a63c8915b511c84c2cbaa267229e3aa162bac 100644
|
| --- a/src/s390/code-stubs-s390.cc
|
| +++ b/src/s390/code-stubs-s390.cc
|
| @@ -2771,9 +2771,8 @@
|
| // --
|
| // -- sp[0] : last argument
|
| // -- ...
|
| - // -- sp[(argc - 1) * 4] : first argument
|
| + // -- sp[(argc - 1)* 4] : first argument
|
| // -- sp[argc * 4] : receiver
|
| - // -- sp[(argc + 1) * 4] : accessor_holder
|
| // -----------------------------------
|
|
|
| Register callee = r2;
|
| @@ -2799,6 +2798,10 @@
|
|
|
| // context save
|
| __ push(context);
|
| + if (!is_lazy()) {
|
| + // load context from callee
|
| + __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset));
|
| + }
|
|
|
| // callee
|
| __ push(callee);
|
| @@ -2817,20 +2820,6 @@
|
| __ push(scratch);
|
| // holder
|
| __ push(holder);
|
| -
|
| - // Enter a new context
|
| - if (is_lazy()) {
|
| - // Load context from accessor_holder
|
| - Register accessor_holder = context;
|
| - __ LoadP(accessor_holder,
|
| - MemOperand(sp, (FCA::kArgsLength + 1 + argc()) * kPointerSize));
|
| - __ LoadP(scratch, FieldMemOperand(accessor_holder, HeapObject::kMapOffset));
|
| - __ GetMapConstructor(scratch, scratch, context, callee);
|
| - __ LoadP(context, FieldMemOperand(scratch, JSFunction::kContextOffset));
|
| - } else {
|
| - // Load context from callee
|
| - __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset));
|
| - }
|
|
|
| // Prepare arguments.
|
| __ LoadRR(scratch, sp);
|
| @@ -2876,8 +2865,12 @@
|
| return_value_offset = 2 + FCA::kReturnValueOffset;
|
| }
|
| MemOperand return_value_operand(fp, return_value_offset * kPointerSize);
|
| - const int stack_space = argc() + FCA::kArgsLength + 2;
|
| - MemOperand* stack_space_operand = nullptr;
|
| + int stack_space = 0;
|
| + MemOperand length_operand =
|
| + MemOperand(sp, kFunctionCallbackInfoOffset + 2 * kPointerSize);
|
| + MemOperand* stack_space_operand = &length_operand;
|
| + stack_space = argc() + FCA::kArgsLength + 1;
|
| + stack_space_operand = NULL;
|
| CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
|
| stack_space_operand, return_value_operand,
|
| &context_restore_operand);
|
|
|