Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 628d987a3408b28bca85d250c57d8dfaf710692e..374e54c97389e448721421ca80898aeb6d42df1d 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -9016,8 +9016,10 @@ void HGraphBuilder::GenerateArguments(CallRuntime* call) { |
HInstruction* elements = AddInstruction( |
new(zone()) HArgumentsElements(false)); |
HInstruction* length = AddInstruction(new(zone()) HArgumentsLength(elements)); |
+ HInstruction* checked_index = |
+ AddInstruction(new(zone()) HBoundsCheck(index, length)); |
HAccessArgumentsAt* result = |
- new(zone()) HAccessArgumentsAt(elements, length, index); |
+ new(zone()) HAccessArgumentsAt(elements, length, checked_index); |
return ast_context()->ReturnInstruction(result, call->id()); |
} |