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

Unified Diff: src/ic/x64/handler-compiler-x64.cc

Issue 1609233002: Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 11 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
Index: src/ic/x64/handler-compiler-x64.cc
diff --git a/src/ic/x64/handler-compiler-x64.cc b/src/ic/x64/handler-compiler-x64.cc
index 991180e00a0df23c902505e1caa8c487fec4614b..a119404a098ebadbe271c199fc404b27a2ca89bf 100644
--- a/src/ic/x64/handler-compiler-x64.cc
+++ b/src/ic/x64/handler-compiler-x64.cc
@@ -181,9 +181,16 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
call_data_undefined = true;
__ LoadRoot(data, Heap::kUndefinedValueRootIndex);
} else {
- __ movp(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset));
- __ movp(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset));
- __ movp(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset));
+ if (optimization.is_constant_call()) {
+ __ movp(data,
+ FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset));
+ __ movp(data,
+ FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset));
+ __ movp(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset));
+ } else {
+ __ movp(data,
+ FieldOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
+ }
__ movp(data, FieldOperand(data, CallHandlerInfo::kDataOffset));
}
@@ -200,7 +207,8 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
RelocInfo::EXTERNAL_REFERENCE);
// Jump to stub.
- CallApiAccessorStub stub(isolate, is_store, call_data_undefined);
+ CallApiAccessorStub stub(isolate, is_store, call_data_undefined,
+ !optimization.is_constant_call());
__ TailCallStub(&stub);
}

Powered by Google App Engine
This is Rietveld 408576698