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

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

Issue 1609233002: Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make GCMole happy again. Created 4 years, 10 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/ic/call-optimization.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ia32/handler-compiler-ia32.cc
diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/ia32/handler-compiler-ia32.cc
index a2edf4fb47db809b7edcc1ffde4892b2758f2b96..60c9536720cb6c9e363b209d487b8beefc5484a2 100644
--- a/src/ic/ia32/handler-compiler-ia32.cc
+++ b/src/ic/ia32/handler-compiler-ia32.cc
@@ -197,9 +197,13 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
call_data_undefined = true;
__ mov(data, Immediate(isolate->factory()->undefined_value()));
} else {
- __ mov(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset));
- __ mov(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset));
- __ mov(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset));
+ if (optimization.is_constant_call()) {
+ __ mov(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset));
+ __ mov(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset));
+ __ mov(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset));
+ } else {
+ __ mov(data, FieldOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
+ }
__ mov(data, FieldOperand(data, CallHandlerInfo::kDataOffset));
}
@@ -214,7 +218,8 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
__ mov(api_function_address, Immediate(function_address));
// 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);
}
« no previous file with comments | « src/ic/call-optimization.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698