Chromium Code Reviews| Index: src/hydrogen.cc |
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
| index 3d0d5505aea05800177fdce62d85f9cafe7dcaef..616b1823a69d04c70b3c0f86d90517cba90d1b21 100644 |
| --- a/src/hydrogen.cc |
| +++ b/src/hydrogen.cc |
| @@ -6100,6 +6100,9 @@ void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) { |
| // The array is expected in the bailout environment during computation |
| // of the property values and is the value of the entire expression. |
| Push(literal); |
| + // The literal index is on the stack, too. |
| + Push(AddInstruction( |
| + new(zone()) HConstant(expr->literal_index(), Representation::Smi()))); |
|
Michael Starzinger
2013/06/13 13:57:27
I would just not specify a particular representati
Sven Panne
2013/06/14 06:04:32
Done.
|
| HInstruction* elements = NULL; |
| @@ -6137,6 +6140,8 @@ void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) { |
| AddSimulate(expr->GetIdForElement(i)); |
| } |
| + |
| + Drop(1); // array literal index |
| return ast_context()->ReturnValue(Pop()); |
| } |