Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index f837045eed037a9235d5cdac317dd84dde883421..b1fd959d2c11a66ca105678674c64daa4b11661b 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -177,7 +177,11 @@ void CodeStubGraphBuilder<TransitionElementsKindStub>::BuildCodeStub() { |
HConstant* max_alloc_size = |
new(zone) HConstant(kMinFreeNewSpaceAfterGC, Representation::Integer32()); |
AddInstruction(max_alloc_size); |
- AddInstruction(new(zone) HBoundsCheck(array_length, max_alloc_size)); |
+ // Since we're forcing Integer32 representation for this HBoundsCheck, |
+ // there's no need to Smi-check the index. |
+ AddInstruction( |
+ new(zone) HBoundsCheck(array_length, max_alloc_size, |
+ DONT_ALLOW_SMI_KEY, Representation::Integer32())); |
current_block()->UpdateEnvironment(new(zone) HEnvironment(zone)); |