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

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

Issue 2770003002: Set the current context to the function's context when entering to LAP. (Closed)
Patch Set: . Created 3 years, 9 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/objects.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index fc080f4c4cc2fc63abbf122d7d4f4e23b903892d..23769ecea604535b27cb147b574cd60b464f9c6b 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2840,7 +2840,13 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
// Push return address back on stack.
__ PushReturnAddressFrom(return_address);
- if (!this->is_lazy()) {
+ if (this->is_lazy()) {
jochen (gone - plz use gerrit) 2017/03/24 15:10:15 you could move this entire block before like 2839,
Yuki 2017/03/28 14:16:58 Done.
+ // load context from holder
+ Register temp = rax;
+ __ movp(temp, FieldOperand(holder, HeapObject::kMapOffset));
+ __ GetMapConstructor(temp, temp, context);
+ __ movp(context, FieldOperand(temp, JSFunction::kContextOffset));
+ } else {
// load context from callee
__ movp(context, FieldOperand(callee, JSFunction::kContextOffset));
}
« no previous file with comments | « src/objects.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698