Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index d37ca7eab2183fa1d97298f3ca764e680af9d2b1..1390eeb07c1bcee069719fb10861d888ee38d752 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -774,7 +774,7 @@ void AstGraphBuilder::VisitForInStatement(ForInStatement* stmt) { |
} |
value = environment()->Pop(); |
// Bind value and do loop body. |
- VisitForInAssignment(stmt->each(), value); |
+ VisitForInAssignment(stmt->each(), value, stmt->AssignmentId()); |
VisitIterationBody(stmt, &for_loop, 5); |
for_loop.EndBody(); |
// Inc counter and continue. |
@@ -1228,7 +1228,8 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) { |
} |
-void AstGraphBuilder::VisitForInAssignment(Expression* expr, Node* value) { |
+void AstGraphBuilder::VisitForInAssignment(Expression* expr, Node* value, |
+ BailoutId bailout_id) { |
DCHECK(expr->IsValidReferenceExpression()); |
// Left-hand side can only be a property, a global or a variable slot. |
@@ -1239,8 +1240,7 @@ void AstGraphBuilder::VisitForInAssignment(Expression* expr, Node* value) { |
switch (assign_type) { |
case VARIABLE: { |
Variable* var = expr->AsVariableProxy()->var(); |
- // TODO(jarin) Fill in the correct bailout id. |
- BuildVariableAssignment(var, value, Token::ASSIGN, BailoutId::None()); |
+ BuildVariableAssignment(var, value, Token::ASSIGN, bailout_id); |
break; |
} |
case NAMED_PROPERTY: { |
@@ -1252,8 +1252,7 @@ void AstGraphBuilder::VisitForInAssignment(Expression* expr, Node* value) { |
MakeUnique(property->key()->AsLiteral()->AsPropertyName()); |
Node* store = |
NewNode(javascript()->StoreNamed(strict_mode(), name), object, value); |
- // TODO(jarin) Fill in the correct bailout id. |
- PrepareFrameState(store, BailoutId::None()); |
+ PrepareFrameState(store, bailout_id); |
break; |
} |
case KEYED_PROPERTY: { |
@@ -1265,8 +1264,7 @@ void AstGraphBuilder::VisitForInAssignment(Expression* expr, Node* value) { |
value = environment()->Pop(); |
Node* store = NewNode(javascript()->StoreProperty(strict_mode()), object, |
key, value); |
- // TODO(jarin) Fill in the correct bailout id. |
- PrepareFrameState(store, BailoutId::None()); |
+ PrepareFrameState(store, bailout_id); |
break; |
} |
} |