Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index d4b9ff23274f6533dfb121ef8e861bae52afc1f7..73f08206095cb9968986aa92d8733a8d0940b96c 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -1075,7 +1075,6 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ push(Immediate(Smi::FromInt(0))); // Initial index. |
// Generate code for doing the condition check. |
- PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS); |
__ bind(&loop); |
SetExpressionAsStatementPosition(stmt->each()); |
@@ -1125,6 +1124,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()); |