Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index fbfce64eea193854e79a59f1c1bd194bbd6bcf6e..ea7f0cef64fe8ba43e7751faff6f5a255ba9a373 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -1139,7 +1139,6 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ Push(r1, r0); // Fixed array length (as smi) and initial index. |
// Generate code for doing the condition check. |
- PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS); |
__ bind(&loop); |
SetExpressionAsStatementPosition(stmt->each()); |
@@ -1192,6 +1191,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()); |