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

Unified Diff: src/ic/ic.cc

Issue 889863002: update vector ics to handle megamorphic keyed loads (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: grokdump Created 5 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
« no previous file with comments | « src/heap/heap.h ('k') | src/type-feedback-vector.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 7a2a36b39e60f7a75db2ea641e9b8b3c4ffa889c..6d002919c23d92215633f5cc22bffe339ea72555 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -637,10 +637,10 @@ void IC::ConfigureVectorState(IC::State new_state) {
}
} else if (kind() == Code::KEYED_LOAD_IC) {
KeyedLoadICNexus* nexus = casted_nexus<KeyedLoadICNexus>();
- if (new_state == GENERIC) {
- nexus->ConfigureGeneric();
- } else if (new_state == PREMONOMORPHIC) {
+ if (new_state == PREMONOMORPHIC) {
nexus->ConfigurePremonomorphic();
+ } else if (new_state == MEGAMORPHIC) {
+ nexus->ConfigureMegamorphic();
} else {
UNREACHABLE();
}
@@ -704,7 +704,7 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
// Rewrite to the generic keyed load stub.
if (FLAG_use_ic) {
if (UseVector()) {
- ConfigureVectorState(GENERIC);
+ ConfigureVectorState(MEGAMORPHIC);
} else {
set_target(*megamorphic_stub());
}
@@ -1433,7 +1433,7 @@ MaybeHandle<Object> KeyedLoadIC::Load(Handle<Object> object,
if (!is_vector_set() || stub.is_null()) {
Code* generic = *megamorphic_stub();
if (!stub.is_null() && *stub == generic) {
- ConfigureVectorState(GENERIC);
+ ConfigureVectorState(MEGAMORPHIC);
TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic");
}
« no previous file with comments | « src/heap/heap.h ('k') | src/type-feedback-vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698