Index: src/ic/ic.cc |
diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
index 93f33cf663f0b7ecee75a53f816f056dd307e987..ef8e069fda99301efa30c9223af4253e221a7442 100644 |
--- a/src/ic/ic.cc |
+++ b/src/ic/ic.cc |
@@ -943,11 +943,15 @@ Handle<Code> LoadIC::initialize_stub(Isolate* isolate, |
Handle<Code> LoadIC::initialize_stub_in_optimized_code( |
- Isolate* isolate, ExtraICState extra_state) { |
+ Isolate* isolate, ExtraICState extra_state, State initialization_state) { |
+ DCHECK(initialization_state == UNINITIALIZED || |
+ initialization_state == PREMONOMORPHIC || |
+ initialization_state == MEGAMORPHIC); |
if (FLAG_vector_ics) { |
return VectorLoadStub(isolate, LoadICState(extra_state)).GetCode(); |
} |
- return initialize_stub(isolate, extra_state); |
+ return PropertyICCompiler::ComputeLoad(isolate, initialization_state, |
+ extra_state); |
} |
@@ -1560,10 +1564,14 @@ Handle<Code> CallIC::initialize_stub_in_optimized_code( |
Handle<Code> StoreIC::initialize_stub(Isolate* isolate, |
- LanguageMode language_mode) { |
+ LanguageMode language_mode, |
+ State initialization_state) { |
+ DCHECK(initialization_state == UNINITIALIZED || |
+ initialization_state == PREMONOMORPHIC || |
+ initialization_state == MEGAMORPHIC); |
ExtraICState extra_state = ComputeExtraICState(language_mode); |
- Handle<Code> ic = |
- PropertyICCompiler::ComputeStore(isolate, UNINITIALIZED, extra_state); |
+ Handle<Code> ic = PropertyICCompiler::ComputeStore( |
+ isolate, initialization_state, extra_state); |
return ic; |
} |