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

Unified Diff: src/ic/ic.cc

Issue 892383003: emit premonomorphic ics for loads/stores in optimized code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 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/ic.h ('k') | src/ic/ic-compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 93f33cf663f0b7ecee75a53f816f056dd307e987..ef8e069fda99301efa30c9223af4253e221a7442 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -943,11 +943,15 @@ Handle<Code> LoadIC::initialize_stub(Isolate* isolate,
Handle<Code> LoadIC::initialize_stub_in_optimized_code(
- Isolate* isolate, ExtraICState extra_state) {
+ Isolate* isolate, ExtraICState extra_state, State initialization_state) {
+ DCHECK(initialization_state == UNINITIALIZED ||
+ initialization_state == PREMONOMORPHIC ||
+ initialization_state == MEGAMORPHIC);
if (FLAG_vector_ics) {
return VectorLoadStub(isolate, LoadICState(extra_state)).GetCode();
}
- return initialize_stub(isolate, extra_state);
+ return PropertyICCompiler::ComputeLoad(isolate, initialization_state,
+ extra_state);
}
@@ -1560,10 +1564,14 @@ Handle<Code> CallIC::initialize_stub_in_optimized_code(
Handle<Code> StoreIC::initialize_stub(Isolate* isolate,
- LanguageMode language_mode) {
+ LanguageMode language_mode,
+ State initialization_state) {
+ DCHECK(initialization_state == UNINITIALIZED ||
+ initialization_state == PREMONOMORPHIC ||
+ initialization_state == MEGAMORPHIC);
ExtraICState extra_state = ComputeExtraICState(language_mode);
- Handle<Code> ic =
- PropertyICCompiler::ComputeStore(isolate, UNINITIALIZED, extra_state);
+ Handle<Code> ic = PropertyICCompiler::ComputeStore(
+ isolate, initialization_state, extra_state);
return ic;
}
« no previous file with comments | « src/ic/ic.h ('k') | src/ic/ic-compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698