Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 17d9dc6abfb5fe1fe96ab56af228ae953f138b6c..faf933f6835434380a69c7d33799fb0d1cf7891b 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -3764,8 +3764,6 @@ void Map::TraverseTransitionTree(TraverseCallback callback, void* data) { |
MaybeObject* CodeCache::Update(String* name, Code* code) { |
- ASSERT(code->ic_state() == MONOMORPHIC); |
- |
// The number of monomorphic stubs for normal load/store/call IC's can grow to |
// a large number and therefore they need to go into a hash table. They are |
// used to load global properties from cells. |
@@ -6348,6 +6346,20 @@ Map* Code::FindFirstMap() { |
} |
+int Code::GetMapCount() { |
+ ASSERT(is_inline_cache_stub()); |
+ AssertNoAllocation no_allocation; |
+ int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
+ int count = 0; |
+ for (RelocIterator it(this, mask); !it.done(); it.next()) { |
+ RelocInfo* info = it.rinfo(); |
+ Object* object = info->target_object(); |
+ if (object->IsMap()) ++count; |
+ } |
+ return count; |
+} |
+ |
+ |
#ifdef ENABLE_DISASSEMBLER |
#ifdef OBJECT_PRINT |
@@ -6510,10 +6522,8 @@ const char* Code::Kind2String(Kind kind) { |
case BUILTIN: return "BUILTIN"; |
case LOAD_IC: return "LOAD_IC"; |
case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; |
- case KEYED_EXTERNAL_ARRAY_LOAD_IC: return "KEYED_EXTERNAL_ARRAY_LOAD_IC"; |
case STORE_IC: return "STORE_IC"; |
case KEYED_STORE_IC: return "KEYED_STORE_IC"; |
- case KEYED_EXTERNAL_ARRAY_STORE_IC: return "KEYED_EXTERNAL_ARRAY_STORE_IC"; |
case CALL_IC: return "CALL_IC"; |
case KEYED_CALL_IC: return "KEYED_CALL_IC"; |
case TYPE_RECORDING_BINARY_OP_IC: return "TYPE_RECORDING_BINARY_OP_IC"; |