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

Unified Diff: src/ic/arm64/handler-compiler-arm64.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/arm64/handler-compiler-arm64.cc
diff --git a/src/ic/arm64/handler-compiler-arm64.cc b/src/ic/arm64/handler-compiler-arm64.cc
index 8044ffbab6e95209123e70fbf0d1a24b6f36bf57..20391c7b5d7f2d48bb650de66b8c28e9ef43d0d0 100644
--- a/src/ic/arm64/handler-compiler-arm64.cc
+++ b/src/ic/arm64/handler-compiler-arm64.cc
@@ -198,11 +198,17 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
call_data_undefined = true;
__ LoadRoot(data, Heap::kUndefinedValueRootIndex);
} else {
- __ Ldr(data,
- FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset));
- __ Ldr(data,
- FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset));
- __ Ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
+ if (optimization.is_constant_call()) {
+ __ Ldr(data,
+ FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset));
+ __ Ldr(data,
+ FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset));
+ __ Ldr(data,
+ FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
+ } else {
+ __ Ldr(data,
+ FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
+ }
__ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset));
}
@@ -221,7 +227,8 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
__ Mov(api_function_address, ref);
// 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