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

Unified Diff: src/x87/code-stubs-x87.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/x64/code-stubs-x64.cc ('k') | test/unittests/api/v8-object-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index cc42f091ea6d21bce5be5c2c76f7cc63570424e0..e18336d8100d8f589c6a2d0ffee24aa1cceaddc9 100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -3237,7 +3237,6 @@
// -- ...
// -- esp[argc * 4] : first argument
// -- esp[(argc + 1) * 4] : receiver
- // -- esp[(argc + 2) * 4] : accessor_holder
// -----------------------------------
Register callee = edi;
@@ -3290,24 +3289,15 @@
// holder
__ push(holder);
- // enter a new context
- if (is_lazy()) {
- // load context from accessor_holder
- Register accessor_holder = context;
- __ movp(accessor_holder,
- MemOperand(esp, (argc() + FCA::kArgsLength + 1) * kPointerSize));
- __ movp(scratch, FieldOperand(accessor_holder, HeapObject::kMapOffset));
- __ GetMapConstructor(scratch, scratch, context);
- __ movp(context, FieldOperand(scratch, JSFunction::kContextOffset));
- } else {
+ __ mov(scratch, esp);
+
+ // push return address
+ __ push(return_address);
+
+ if (!is_lazy()) {
// load context from callee
__ mov(context, FieldOperand(callee, JSFunction::kContextOffset));
}
-
- __ mov(scratch, esp);
-
- // push return address
- __ push(return_address);
// API function gets reference to the v8::Arguments. If CPU profiler
// is enabled wrapper function will be called and we need to pass
@@ -3346,8 +3336,11 @@
return_value_offset = 2 + FCA::kReturnValueOffset;
}
Operand return_value_operand(ebp, return_value_offset * kPointerSize);
- const int stack_space = argc() + FCA::kArgsLength + 2;
- Operand* stack_space_operand = nullptr;
+ int stack_space = 0;
+ Operand length_operand = ApiParameterOperand(4);
+ Operand* stack_space_operand = &length_operand;
+ stack_space = argc() + FCA::kArgsLength + 1;
+ stack_space_operand = nullptr;
CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
ApiParameterOperand(1), stack_space,
stack_space_operand, return_value_operand,
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/unittests/api/v8-object-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698