Commit 19e15394 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Tag previously GENERIC stubs that potentially IC_Miss as MONOMORPHIC.

Review URL: https://chromiumcodereview.appspot.com/12079024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6948fece
...@@ -145,11 +145,11 @@ enum BuiltinExtraArguments { ...@@ -145,11 +145,11 @@ enum BuiltinExtraArguments {
Code::kNoExtraICState) \ Code::kNoExtraICState) \
V(KeyedLoadIC_Generic, KEYED_LOAD_IC, GENERIC, \ V(KeyedLoadIC_Generic, KEYED_LOAD_IC, GENERIC, \
Code::kNoExtraICState) \ Code::kNoExtraICState) \
V(KeyedLoadIC_String, KEYED_LOAD_IC, GENERIC, \ V(KeyedLoadIC_String, KEYED_LOAD_IC, MONOMORPHIC, \
Code::kNoExtraICState) \ Code::kNoExtraICState) \
V(KeyedLoadIC_IndexedInterceptor, KEYED_LOAD_IC, GENERIC, \ V(KeyedLoadIC_IndexedInterceptor, KEYED_LOAD_IC, MONOMORPHIC, \
Code::kNoExtraICState) \ Code::kNoExtraICState) \
V(KeyedLoadIC_NonStrictArguments, KEYED_LOAD_IC, GENERIC, \ V(KeyedLoadIC_NonStrictArguments, KEYED_LOAD_IC, MONOMORPHIC, \
Code::kNoExtraICState) \ Code::kNoExtraICState) \
\ \
V(StoreIC_Initialize, STORE_IC, UNINITIALIZED, \ V(StoreIC_Initialize, STORE_IC, UNINITIALIZED, \
...@@ -180,7 +180,7 @@ enum BuiltinExtraArguments { ...@@ -180,7 +180,7 @@ enum BuiltinExtraArguments {
kStrictMode) \ kStrictMode) \
V(KeyedStoreIC_Generic_Strict, KEYED_STORE_IC, GENERIC, \ V(KeyedStoreIC_Generic_Strict, KEYED_STORE_IC, GENERIC, \
kStrictMode) \ kStrictMode) \
V(KeyedStoreIC_NonStrictArguments, KEYED_STORE_IC, GENERIC, \ V(KeyedStoreIC_NonStrictArguments, KEYED_STORE_IC, MONOMORPHIC, \
Code::kNoExtraICState) \ Code::kNoExtraICState) \
V(TransitionElementsSmiToDouble, BUILTIN, UNINITIALIZED, \ V(TransitionElementsSmiToDouble, BUILTIN, UNINITIALIZED, \
Code::kNoExtraICState) \ Code::kNoExtraICState) \
......
...@@ -989,9 +989,11 @@ void IC::PatchCache(State state, ...@@ -989,9 +989,11 @@ void IC::PatchCache(State state,
? *generic_stub_strict() ? *generic_stub_strict()
: *generic_stub()); : *generic_stub());
break; break;
case GENERIC:
case DEBUG_STUB: case DEBUG_STUB:
break; break;
case GENERIC:
UNREACHABLE();
break;
} }
} }
...@@ -1154,11 +1156,11 @@ static void GetReceiverMapsForStub(Handle<Code> stub, ...@@ -1154,11 +1156,11 @@ static void GetReceiverMapsForStub(Handle<Code> stub,
break; break;
} }
case MEGAMORPHIC: case MEGAMORPHIC:
case GENERIC:
break; break;
case UNINITIALIZED: case UNINITIALIZED:
case PREMONOMORPHIC: case PREMONOMORPHIC:
case MONOMORPHIC_PROTOTYPE_FAILURE: case MONOMORPHIC_PROTOTYPE_FAILURE:
case GENERIC:
case DEBUG_STUB: case DEBUG_STUB:
UNREACHABLE(); UNREACHABLE();
break; break;
...@@ -1208,7 +1210,7 @@ Handle<Code> KeyedLoadIC::LoadElementStub(Handle<JSObject> receiver) { ...@@ -1208,7 +1210,7 @@ Handle<Code> KeyedLoadIC::LoadElementStub(Handle<JSObject> receiver) {
return isolate()->stub_cache()->ComputeKeyedLoadElement(receiver_map); return isolate()->stub_cache()->ComputeKeyedLoadElement(receiver_map);
} }
ASSERT(target() != *generic_stub()); ASSERT(ic_state != GENERIC);
// Determine the list of receiver maps that this call site has seen, // Determine the list of receiver maps that this call site has seen,
// adding the map that was just encountered. // adding the map that was just encountered.
...@@ -1590,7 +1592,7 @@ Handle<Code> KeyedStoreIC::StoreElementStub(Handle<JSObject> receiver, ...@@ -1590,7 +1592,7 @@ Handle<Code> KeyedStoreIC::StoreElementStub(Handle<JSObject> receiver,
monomorphic_map, stub_kind, strict_mode, grow_mode); monomorphic_map, stub_kind, strict_mode, grow_mode);
} }
ASSERT(target() != *generic_stub() && target() != *generic_stub_strict()); ASSERT(ic_state != GENERIC);
bool map_added = bool map_added =
AddOneReceiverMapIfMissing(&target_receiver_maps, receiver_map); AddOneReceiverMapIfMissing(&target_receiver_maps, receiver_map);
......
...@@ -493,8 +493,7 @@ void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, ...@@ -493,8 +493,7 @@ void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id,
Handle<Object> object = GetInfo(ast_id); Handle<Object> object = GetInfo(ast_id);
if (object->IsUndefined() || object->IsSmi()) return; if (object->IsUndefined() || object->IsSmi()) return;
if (*object == if (object.is_identical_to(isolate_->builtins()->StoreIC_GlobalProxy())) {
isolate_->builtins()->builtin(Builtins::kStoreIC_GlobalProxy)) {
// TODO(fschneider): We could collect the maps and signal that // TODO(fschneider): We could collect the maps and signal that
// we need a generic store (or load) here. // we need a generic store (or load) here.
ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC); ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment