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

Unified Diff: src/ic.cc

Issue 11747022: Introduce POLYMORPHIC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 12 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 | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 8dbe9094abe130b63c00a8049058e3feb487dcbd..25bed5944273b22c3df27b6108be3e1b784874a9 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -43,9 +43,10 @@ namespace internal {
char IC::TransitionMarkFromState(IC::State state) {
switch (state) {
case UNINITIALIZED: return '0';
- case PREMONOMORPHIC: return 'P';
+ case PREMONOMORPHIC: return '.';
case MONOMORPHIC: return '1';
case MONOMORPHIC_PROTOTYPE_FAILURE: return '^';
+ case POLYMORPHIC: return 'P';
case MEGAMORPHIC: return IsGeneric() ? 'G' : 'N';
// We never see the debugger states here, because the state is
@@ -772,6 +773,9 @@ void CallICBase::UpdateCaches(LookupResult* lookup,
case DEBUG_BREAK:
case DEBUG_PREPARE_STEP_IN:
break;
+ case POLYMORPHIC:
+ UNREACHABLE();
+ break;
}
TRACE_IC(kind_ == Code::CALL_IC ? "CallIC" : "KeyedCallIC",
@@ -1064,6 +1068,9 @@ void LoadIC::UpdateCaches(LookupResult* lookup,
case DEBUG_BREAK:
case DEBUG_PREPARE_STEP_IN:
break;
+ case POLYMORPHIC:
+ UNREACHABLE();
+ break;
}
TRACE_IC("LoadIC", name, state, target());
@@ -1333,6 +1340,7 @@ void KeyedLoadIC::UpdateCaches(LookupResult* lookup,
case DEBUG_PREPARE_STEP_IN:
break;
case MONOMORPHIC_PROTOTYPE_FAILURE:
+ case POLYMORPHIC:
UNREACHABLE();
break;
}
@@ -1605,6 +1613,9 @@ void StoreIC::UpdateCaches(LookupResult* lookup,
case DEBUG_BREAK:
case DEBUG_PREPARE_STEP_IN:
break;
+ case POLYMORPHIC:
+ UNREACHABLE();
+ break;
}
TRACE_IC("StoreIC", name, state, target());
@@ -1649,6 +1660,7 @@ void KeyedIC::GetReceiverMapsForStub(Handle<Code> stub,
case UNINITIALIZED:
case PREMONOMORPHIC:
case MONOMORPHIC_PROTOTYPE_FAILURE:
+ case POLYMORPHIC:
case DEBUG_BREAK:
case DEBUG_PREPARE_STEP_IN:
UNREACHABLE();
@@ -1742,7 +1754,7 @@ Handle<Code> KeyedIC::ComputeStub(Handle<JSObject> receiver,
isolate()->factory()->polymorphic_code_cache();
Code::ExtraICState extra_state = Code::ComputeExtraICState(grow_mode,
strict_mode);
- Code::Flags flags = Code::ComputeFlags(kind(), MEGAMORPHIC, extra_state);
+ Code::Flags flags = Code::ComputeFlags(kind(), POLYMORPHIC, extra_state);
Handle<Object> probe = cache->Lookup(&target_receiver_maps, flags);
if (probe->IsCode()) return Handle<Code>::cast(probe);
@@ -2099,6 +2111,7 @@ void KeyedStoreIC::UpdateCaches(LookupResult* lookup,
case DEBUG_PREPARE_STEP_IN:
break;
case MONOMORPHIC_PROTOTYPE_FAILURE:
+ case POLYMORPHIC:
UNREACHABLE();
break;
}
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698