Index: src/ic/ic-compiler.cc |
diff --git a/src/ic/ic-compiler.cc b/src/ic/ic-compiler.cc |
index d7b95dada29503ffaddc0a934bcb0f651b013cd4..2f9830a57e79b43e874f55def03b86685e31ec69 100644 |
--- a/src/ic/ic-compiler.cc |
+++ b/src/ic/ic-compiler.cc |
@@ -362,16 +362,20 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic( |
transitioned_map->elements_kind(), |
is_js_array, store_mode).GetCode(); |
} else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) { |
+ // TODO(mvstanton): Consider embedding store_mode in the state of the slow |
+ // keyed store ic for uniformity. |
cached_stub = isolate()->builtins()->KeyedStoreIC_Slow(); |
} else { |
if (IsSloppyArgumentsElements(elements_kind)) { |
- cached_stub = KeyedStoreSloppyArgumentsStub(isolate()).GetCode(); |
+ cached_stub = |
+ KeyedStoreSloppyArgumentsStub(isolate(), store_mode).GetCode(); |
} else if (receiver_map->has_fast_elements() || |
receiver_map->has_fixed_typed_array_elements()) { |
cached_stub = StoreFastElementStub(isolate(), is_js_array, |
elements_kind, store_mode).GetCode(); |
} else { |
- cached_stub = StoreElementStub(isolate(), elements_kind).GetCode(); |
+ cached_stub = |
+ StoreElementStub(isolate(), elements_kind, store_mode).GetCode(); |
} |
} |
DCHECK(!cached_stub.is_null()); |
@@ -396,13 +400,13 @@ Handle<Code> PropertyICCompiler::CompileKeyedStoreMonomorphic( |
bool is_jsarray = receiver_map->instance_type() == JS_ARRAY_TYPE; |
Handle<Code> stub; |
if (receiver_map->has_sloppy_arguments_elements()) { |
- stub = KeyedStoreSloppyArgumentsStub(isolate()).GetCode(); |
+ stub = KeyedStoreSloppyArgumentsStub(isolate(), store_mode).GetCode(); |
} else if (receiver_map->has_fast_elements() || |
receiver_map->has_fixed_typed_array_elements()) { |
stub = StoreFastElementStub(isolate(), is_jsarray, elements_kind, |
store_mode).GetCode(); |
} else { |
- stub = StoreElementStub(isolate(), elements_kind).GetCode(); |
+ stub = StoreElementStub(isolate(), elements_kind, store_mode).GetCode(); |
} |
Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); |