Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: src/arm64/code-stubs-arm64.cc

Issue 2973593002: Revert of Set the current context to the function's context when entering to LAP. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index e86135294f70c947c34e7f8ae214376de0fb95b0..810f3aa7c831c3d4693653f0d9d7626f19904e81 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -2941,7 +2941,6 @@
// -- ...
// -- sp[(argc - 1) * 8] : first argument
// -- sp[argc * 8] : receiver
- // -- sp[(argc + 1) * 8] : accessor_holder
// -----------------------------------
Register callee = x0;
@@ -2970,29 +2969,18 @@
// context, callee and call data.
__ Push(context, callee, call_data);
- Register scratch = call_data;
- __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
+ if (!is_lazy()) {
+ // Load context from callee
+ __ Ldr(context, FieldMemOperand(callee, JSFunction::kContextOffset));
+ }
+
+ __ LoadRoot(call_data, Heap::kUndefinedValueRootIndex);
Register isolate_reg = x5;
__ Mov(isolate_reg, ExternalReference::isolate_address(masm->isolate()));
// FunctionCallbackArguments:
// return value, return value default, isolate, holder.
- __ Push(scratch, scratch, isolate_reg, holder);
-
- // Enter a new context
- if (is_lazy()) {
- // Load context from accessor_holder
- Register accessor_holder = context;
- __ Ldr(accessor_holder,
- MemOperand(__ StackPointer(),
- (FCA::kArgsLength + 1 + argc()) * kPointerSize));
- __ Ldr(scratch, FieldMemOperand(accessor_holder, HeapObject::kMapOffset));
- __ GetMapConstructor(scratch, scratch, context, callee);
- __ Ldr(context, FieldMemOperand(scratch, JSFunction::kContextOffset));
- } else {
- // Load context from callee
- __ Ldr(context, FieldMemOperand(callee, JSFunction::kContextOffset));
- }
+ __ Push(call_data, call_data, isolate_reg, holder);
// Prepare arguments.
Register args = x6;
@@ -3034,8 +3022,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(masm->StackPointer(), 3 * kPointerSize);
+ MemOperand* stack_space_operand = &length_operand;
+ stack_space = argc() + FCA::kArgsLength + 1;
+ stack_space_operand = NULL;
const int spill_offset = 1 + kApiStackSpace;
CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698