Index: src/ic/ic.cc |
diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
index 50c9d72605e30231eca4901f00108aaac8ca84d9..e329ca0d227f4d8e7f2f63c9a6b458dd5a2e1e1b 100644 |
--- a/src/ic/ic.cc |
+++ b/src/ic/ic.cc |
@@ -1350,13 +1350,42 @@ Handle<Code> StoreIC::initialize_stub(Isolate* isolate, |
Handle<Code> StoreIC::megamorphic_stub() { |
- return PropertyICCompiler::ComputeStore(isolate(), MEGAMORPHIC, |
- extra_ic_state()); |
+ if (kind() == Code::STORE_IC) { |
+ return PropertyICCompiler::ComputeStore(isolate(), MEGAMORPHIC, |
+ extra_ic_state()); |
+ } else { |
+ DCHECK(kind() == Code::KEYED_STORE_IC); |
+ if (strict_mode() == STRICT) { |
+ return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); |
+ } else { |
+ return isolate()->builtins()->KeyedStoreIC_Generic(); |
+ } |
+ } |
} |
Handle<Code> StoreIC::generic_stub() const { |
- return PropertyICCompiler::ComputeStore(isolate(), GENERIC, extra_ic_state()); |
+ if (kind() == Code::STORE_IC) { |
+ return PropertyICCompiler::ComputeStore(isolate(), GENERIC, |
+ extra_ic_state()); |
+ } else { |
+ DCHECK(kind() == Code::KEYED_STORE_IC); |
+ if (strict_mode() == STRICT) { |
+ return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); |
+ } else { |
+ return isolate()->builtins()->KeyedStoreIC_Generic(); |
+ } |
+ } |
+} |
+ |
+ |
+Handle<Code> StoreIC::slow_stub() const { |
+ if (kind() == Code::STORE_IC) { |
+ return isolate()->builtins()->StoreIC_Slow(); |
+ } else { |
+ DCHECK(kind() == Code::KEYED_STORE_IC); |
+ return isolate()->builtins()->KeyedStoreIC_Slow(); |
+ } |
} |