Index: src/ic/handler-compiler.cc |
diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc |
index 04b8fb0c8cd436e804b86af5ca5d29500952f3db..26d195326f84620876c7a3f344cad64550a12781 100644 |
--- a/src/ic/handler-compiler.cc |
+++ b/src/ic/handler-compiler.cc |
@@ -537,7 +537,8 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
void ElementHandlerCompiler::CompileElementHandlers( |
- MapHandleList* receiver_maps, CodeHandleList* handlers) { |
+ MapHandleList* receiver_maps, CodeHandleList* handlers, |
+ LanguageMode language_mode) { |
for (int i = 0; i < receiver_maps->length(); ++i) { |
Handle<Map> receiver_map = receiver_maps->at(i); |
Handle<Code> cached_stub; |
@@ -545,7 +546,9 @@ void ElementHandlerCompiler::CompileElementHandlers( |
if (receiver_map->IsStringMap()) { |
cached_stub = LoadIndexedStringStub(isolate()).GetCode(); |
} else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) { |
- cached_stub = isolate()->builtins()->KeyedLoadIC_Slow(); |
+ cached_stub = is_strong(language_mode) |
+ ? isolate()->builtins()->KeyedLoadIC_Slow_Strong() |
+ : isolate()->builtins()->KeyedLoadIC_Slow(); |
} else { |
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; |
ElementsKind elements_kind = receiver_map->elements_kind(); |
@@ -553,8 +556,10 @@ void ElementHandlerCompiler::CompileElementHandlers( |
// No need to check for an elements-free prototype chain here, the |
// generated stub code needs to check that dynamically anyway. |
bool convert_hole_to_undefined = |
- is_js_array && elements_kind == FAST_HOLEY_ELEMENTS && |
- *receiver_map == isolate()->get_initial_js_array_map(elements_kind); |
+ (is_js_array && elements_kind == FAST_HOLEY_ELEMENTS && |
+ *receiver_map == |
+ isolate()->get_initial_js_array_map(elements_kind)) && |
+ !is_strong(language_mode); |
if (receiver_map->has_indexed_interceptor()) { |
cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode(); |
@@ -567,7 +572,10 @@ void ElementHandlerCompiler::CompileElementHandlers( |
convert_hole_to_undefined).GetCode(); |
} else { |
DCHECK(elements_kind == DICTIONARY_ELEMENTS); |
- cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); |
+ LoadICState state = |
+ LoadICState(is_strong(language_mode) ? LoadICState::kStrongModeState |
+ : kNoExtraICState); |
+ cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); |
} |
} |