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

Unified Diff: src/objects.cc

Issue 2052763003: [ic] [stubs] Remove InlineCacheState field from the code flags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 4164df55d8db6723e2177182dfaa0ce26800960e..ce244c6c69a412987bf3f7f464db34d27946815b 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -13939,6 +13939,28 @@ WeakCell* Code::CachedWeakCell() {
return NULL;
}
+InlineCacheState Code::ic_state() {
+ switch (kind()) {
+ case Code::BINARY_OP_IC: {
+ BinaryOpICState state(GetIsolate(), extra_ic_state());
+ return state.GetICState();
+ }
+ case Code::COMPARE_IC: {
+ CompareICStub stub(GetIsolate(), extra_ic_state());
+ return stub.GetICState();
+ }
+ case Code::TO_BOOLEAN_IC: {
+ ToBooleanICStub stub(GetIsolate(), extra_ic_state());
+ return stub.GetICState();
+ }
+ case Code::DEBUG_STUB:
+ return UNINITIALIZED;
+
+ default:
+ DCHECK(is_inline_cache_stub() || !IC::ICUseVector(kind()));
+ return UNINITIALIZED;
Toon Verwaest 2016/06/09 13:49:12 This looks weird, this case should be unreachable
Igor Sheludko 2016/06/09 15:18:21 Done.
+ }
+}
#ifdef ENABLE_DISASSEMBLER
@@ -14202,7 +14224,6 @@ const char* Code::ICState2String(InlineCacheState state) {
case POLYMORPHIC: return "POLYMORPHIC";
case MEGAMORPHIC: return "MEGAMORPHIC";
case GENERIC: return "GENERIC";
- case DEBUG_STUB: return "DEBUG_STUB";
}
UNREACHABLE();
return NULL;
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698