| Index: src/stub-cache.cc
|
| diff --git a/src/stub-cache.cc b/src/stub-cache.cc
|
| index ac94fffebd0553b34a3fdf315d1220506178b833..8d24b4b9d37a1848802074b2d329868e53f42cc4 100644
|
| --- a/src/stub-cache.cc
|
| +++ b/src/stub-cache.cc
|
| @@ -446,7 +446,9 @@ Handle<Code> StubCache::ComputeKeyedStoreElement(
|
| Code::KEYED_STORE_IC, extra_state);
|
|
|
| ASSERT(store_mode == STANDARD_STORE ||
|
| - store_mode == STORE_AND_GROW_NO_TRANSITION);
|
| + store_mode == STORE_AND_GROW_NO_TRANSITION ||
|
| + store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
|
| + store_mode == STORE_NO_TRANSITION_HANDLE_COW);
|
|
|
| Handle<String> name =
|
| isolate()->factory()->KeyedStoreElementMonomorphic_string();
|
| @@ -914,7 +916,9 @@ Handle<Code> StubCache::ComputeStoreElementPolymorphic(
|
| KeyedAccessStoreMode store_mode,
|
| StrictModeFlag strict_mode) {
|
| ASSERT(store_mode == STANDARD_STORE ||
|
| - store_mode == STORE_AND_GROW_NO_TRANSITION);
|
| + store_mode == STORE_AND_GROW_NO_TRANSITION ||
|
| + store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
|
| + store_mode == STORE_NO_TRANSITION_HANDLE_COW);
|
| Handle<PolymorphicCodeCache> cache =
|
| isolate_->factory()->polymorphic_code_cache();
|
| Code::ExtraICState extra_state = Code::ComputeExtraICState(store_mode,
|
| @@ -1699,10 +1703,18 @@ Handle<Code> KeyedStoreStubCompiler::CompileStoreElementPolymorphic(
|
| strict_mode_,
|
| store_mode_).GetCode(isolate());
|
| } else {
|
| - cached_stub = KeyedStoreElementStub(
|
| - is_js_array,
|
| - elements_kind,
|
| - store_mode_).GetCode(isolate());
|
| + if (receiver_map->has_fast_elements() ||
|
| + receiver_map->has_external_array_elements()) {
|
| + cached_stub = KeyedStoreFastElementStub(
|
| + is_js_array,
|
| + elements_kind,
|
| + store_mode_).GetCode(isolate());
|
| + } else {
|
| + cached_stub = KeyedStoreElementStub(
|
| + is_js_array,
|
| + elements_kind,
|
| + store_mode_).GetCode(isolate());
|
| + }
|
| }
|
| ASSERT(!cached_stub.is_null());
|
| handlers.Add(cached_stub);
|
|
|