diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc index a85dcd5559..39fe69c81e 100644 --- a/src/compiler/ast-graph-builder.cc +++ b/src/compiler/ast-graph-builder.cc @@ -610,6 +610,8 @@ void AstGraphBuilder::VisitForStatement(ForStatement* stmt) { VisitForTest(stmt->cond()); Node* condition = environment()->Pop(); for_loop.BreakUnless(condition); + } else { + for_loop.BreakUnless(jsgraph()->TrueConstant()); } VisitIterationBody(stmt, &for_loop, 0); for_loop.EndBody(); diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status index ff8eee763d..b61be30c79 100644 --- a/test/cctest/cctest.status +++ b/test/cctest/cctest.status @@ -150,9 +150,6 @@ 'test-debug/DebugEventContext': [PASS, NO_VARIANTS], 'test-debug/DebugBreakInline': [PASS, NO_VARIANTS], - # Scheduling and verifying of empty for loops is broken. - 'test-run-jsbranches/EmptyFor': [SKIP], - ############################################################################ # Slow tests. 'test-api/Threading1': [PASS, ['mode == debug', SLOW]], diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status index 6932f55f34..bf297fe0be 100644 --- a/test/mjsunit/mjsunit.status +++ b/test/mjsunit/mjsunit.status @@ -120,9 +120,6 @@ 'regress/regress-crbug-259300': [PASS, NO_VARIANTS], 'regress/regress-frame-details-null-receiver': [PASS, NO_VARIANTS], - # Infinite loops of the form "for(;;) ;" don't schedule or crash in verifier. - 'asm/infinite-loops': [PASS, NO_VARIANTS], - ############################################################################## # Too slow in debug mode with --stress-opt mode. 'compiler/regress-stacktrace-methods': [PASS, ['mode == debug', SKIP]],