Index: src/ic/ic-compiler.cc |
diff --git a/src/ic/ic-compiler.cc b/src/ic/ic-compiler.cc |
index f597083e631be5e9aa49adcab9dbcf58a0225581..e25a3d9d1f6f60b0361bc3397687fde85b4d889f 100644 |
--- a/src/ic/ic-compiler.cc |
+++ b/src/ic/ic-compiler.cc |
@@ -110,7 +110,11 @@ Handle<Code> PropertyICCompiler::ComputeKeyedLoadMonomorphic( |
Handle<Code> PropertyICCompiler::ComputeKeyedLoadMonomorphicHandler( |
Handle<Map> receiver_map) { |
Isolate* isolate = receiver_map->GetIsolate(); |
+ bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; |
ElementsKind elements_kind = receiver_map->elements_kind(); |
+ bool convert_hole_to_undefined = |
Jakob Kummerow
2015/04/23 13:40:00
Checking for a pristine array prototype is pointle
mvstanton
2015/04/27 07:57:13
That's right, and good idea to comment that. Done.
|
+ is_js_array && elements_kind == FAST_HOLEY_ELEMENTS && |
+ *receiver_map == isolate->get_initial_js_array_map(elements_kind); |
Handle<Code> stub; |
if (receiver_map->has_indexed_interceptor()) { |
stub = LoadIndexedInterceptorStub(isolate).GetCode(); |
@@ -122,9 +126,8 @@ Handle<Code> PropertyICCompiler::ComputeKeyedLoadMonomorphicHandler( |
} else if (receiver_map->has_fast_elements() || |
receiver_map->has_external_array_elements() || |
receiver_map->has_fixed_typed_array_elements()) { |
- stub = LoadFastElementStub(isolate, |
- receiver_map->instance_type() == JS_ARRAY_TYPE, |
- elements_kind).GetCode(); |
+ stub = LoadFastElementStub(isolate, is_js_array, elements_kind, |
+ convert_hole_to_undefined).GetCode(); |
} else { |
stub = LoadDictionaryElementStub(isolate).GetCode(); |
} |