Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 6bc8af595d2eb26ac0fb069351560dbf8faad410..4908586f7c757c1654004bd1513930b694908d83 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -3242,6 +3242,10 @@ void HGraphBuilder::VisitForInStatement(ForInStatement* stmt) { |
ASSERT(current_block() != NULL); |
ASSERT(current_block()->HasPredecessor()); |
+ if (!FLAG_optimize_for_in) { |
+ return Bailout("ForInStatement optimization is disabled"); |
+ } |
+ |
if (!stmt->each()->IsVariableProxy() || |
!stmt->each()->AsVariableProxy()->var()->IsStackLocal()) { |
return Bailout("ForInStatement with non-local each variable"); |