| Index: src/x64/stub-cache-x64.cc
|
| diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
|
| index 8c5cb9f664638ebf713fdc72e56afa5277a1aad7..1cfe9d4d25e0455b809ba95b312e291ec4c2e3fe 100644
|
| --- a/src/x64/stub-cache-x64.cc
|
| +++ b/src/x64/stub-cache-x64.cc
|
| @@ -2591,12 +2591,20 @@ Handle<Code> KeyedStoreStubCompiler::CompileStoreElement(
|
|
|
| ElementsKind elements_kind = receiver_map->elements_kind();
|
| bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
|
| - Handle<Code> stub =
|
| - KeyedStoreElementStub(is_js_array,
|
| - elements_kind,
|
| - store_mode_).GetCode(isolate());
|
| -
|
| - __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK);
|
| + if (FLAG_compiled_keyed_stores &&
|
| + (receiver_map->has_fast_elements() ||
|
| + receiver_map->has_external_array_elements())) {
|
| + Handle<Code> stub = KeyedStoreFastElementStub(
|
| + is_js_array,
|
| + elements_kind,
|
| + store_mode_).GetCode(isolate());
|
| + __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK);
|
| + } else {
|
| + Handle<Code> stub =
|
| + KeyedStoreElementStub(is_js_array, elements_kind,
|
| + store_mode_).GetCode(isolate());
|
| + __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK);
|
| + }
|
|
|
| TailCallBuiltin(masm(), MissBuiltin(kind()));
|
|
|
|
|