Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 2ac3d520dbfbbba913f20e1e3e729223caf54de0..77890f6fbf8f3aca926641450cbe885d14277ecd 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -7098,11 +7098,13 @@ LoadKeyedHoleMode HOptimizedGraphBuilder::BuildKeyedHoleMode(Handle<Map> map) { |
// Loads from a "stock" fast holey array can convert the hole to undefined |
// with impunity. |
LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE; |
+ bool holey_smi_elements = |
+ *map == isolate()->get_initial_js_array_map(FAST_HOLEY_SMI_ELEMENTS); |
bool holey_double_elements = |
*map == isolate()->get_initial_js_array_map(FAST_HOLEY_DOUBLE_ELEMENTS); |
bool holey_elements = |
*map == isolate()->get_initial_js_array_map(FAST_HOLEY_ELEMENTS); |
- if ((holey_double_elements || holey_elements) && |
+ if ((holey_smi_elements || holey_double_elements || holey_elements) && |
isolate()->IsFastArrayConstructorPrototypeChainIntact()) { |
load_mode = |
holey_double_elements ? ALLOW_RETURN_HOLE : CONVERT_HOLE_TO_UNDEFINED; |