Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 1d1f94bd0e82ffa58301ce91b772a9a86d28dc2b..6b2783e911041ba9b6033fe393413b1cd8567dc4 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -4127,8 +4127,7 @@ void HGraphBuilder::VisitForInStatement(ForInStatement* stmt) { |
HValue* key = AddInstruction( |
new(zone()) HLoadKeyedFastElement( |
environment()->ExpressionStackAt(2), // Enum cache. |
- environment()->ExpressionStackAt(0), // Iteration index. |
- OMIT_HOLE_CHECK)); |
+ environment()->ExpressionStackAt(0))); // Iteration index. |
// Check if the expected map still matches that of the enumerable. |
// If not just deoptimize. |
@@ -5482,7 +5481,8 @@ HInstruction* HGraphBuilder::BuildFastElementAccess(HValue* elements, |
if (IsFastDoubleElementsKind(elements_kind)) { |
return new(zone()) HLoadKeyedFastDoubleElement(elements, checked_key, mode); |
} else { // Smi or Object elements. |
- return new(zone()) HLoadKeyedFastElement(elements, checked_key, mode); |
+ return new(zone()) HLoadKeyedFastElement(elements, checked_key, |
+ elements_kind); |
} |
} |
@@ -5530,7 +5530,8 @@ HInstruction* HGraphBuilder::BuildMonomorphicElementAccess(HValue* object, |
fast_elements || |
map->has_fast_double_elements()); |
if (map->instance_type() == JS_ARRAY_TYPE) { |
- length = AddInstruction(new(zone()) HJSArrayLength(object, mapcheck)); |
+ length = AddInstruction(new(zone()) HJSArrayLength(object, mapcheck, |
+ HType::Smi())); |
} else { |
length = AddInstruction(new(zone()) HFixedArrayBaseLength(elements)); |
} |
@@ -5685,7 +5686,8 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object, |
set_current_block(if_jsarray); |
HInstruction* length; |
- length = AddInstruction(new(zone()) HJSArrayLength(object, typecheck)); |
+ length = AddInstruction(new(zone()) HJSArrayLength(object, typecheck, |
+ HType::Smi())); |
checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length)); |
access = AddInstruction(BuildFastElementAccess( |
elements, checked_key, val, elements_kind, is_store)); |
@@ -5885,7 +5887,6 @@ void HGraphBuilder::VisitProperty(Property* expr) { |
HInstruction* mapcheck = |
AddInstruction(HCheckInstanceType::NewIsJSArray(array, zone())); |
instr = new(zone()) HJSArrayLength(array, mapcheck); |
- |
} else if (expr->IsStringLength()) { |
HValue* string = Pop(); |
AddInstruction(new(zone()) HCheckNonSmi(string)); |