Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 7134bb221e406894222e36ff7810099492140cec..556892d384f4f6b2c47a257a7ebc4ed0f8bc679e 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -1097,7 +1097,6 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ Push(Smi::FromInt(0)); // Initial index. |
// Generate code for doing the condition check. |
- PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS); |
__ bind(&loop); |
SetExpressionAsStatementPosition(stmt->each()); |
@@ -1150,6 +1149,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS); |
} |
+ // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). |
+ PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS); |
// Generate code for the body of the loop. |
Visit(stmt->body()); |