| Index: src/compiler/ast-graph-builder.cc
|
| diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
|
| index 06abeac20cd2777684202a3c184277b006473677..6c8b2469bfafb39a56e6ec259ac1695c285266e8 100644
|
| --- a/src/compiler/ast-graph-builder.cc
|
| +++ b/src/compiler/ast-graph-builder.cc
|
| @@ -1335,7 +1335,7 @@ void AstGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) {
|
| void AstGraphBuilder::VisitDoWhileStatement(DoWhileStatement* stmt) {
|
| LoopBuilder while_loop(this);
|
| while_loop.BeginLoop(GetVariablesAssignedInLoop(stmt), CheckOsrEntry(stmt));
|
| - VisitIterationBody(stmt, &while_loop);
|
| + VisitIterationBody(stmt, &while_loop, stmt->StackCheckId());
|
| while_loop.EndBody();
|
| VisitForTest(stmt->cond());
|
| Node* condition = environment()->Pop();
|
| @@ -1350,7 +1350,7 @@ void AstGraphBuilder::VisitWhileStatement(WhileStatement* stmt) {
|
| VisitForTest(stmt->cond());
|
| Node* condition = environment()->Pop();
|
| while_loop.BreakUnless(condition);
|
| - VisitIterationBody(stmt, &while_loop);
|
| + VisitIterationBody(stmt, &while_loop, stmt->StackCheckId());
|
| while_loop.EndBody();
|
| while_loop.EndLoop();
|
| }
|
| @@ -1367,7 +1367,7 @@ void AstGraphBuilder::VisitForStatement(ForStatement* stmt) {
|
| } else {
|
| for_loop.BreakUnless(jsgraph()->TrueConstant());
|
| }
|
| - VisitIterationBody(stmt, &for_loop);
|
| + VisitIterationBody(stmt, &for_loop, stmt->StackCheckId());
|
| for_loop.EndBody();
|
| VisitIfNotNull(stmt->next());
|
| for_loop.EndLoop();
|
| @@ -1444,7 +1444,7 @@ void AstGraphBuilder::VisitForInStatement(ForInStatement* stmt) {
|
| CreateVectorSlotPair(stmt->EachFeedbackSlot());
|
| VisitForInAssignment(stmt->each(), value, feedback,
|
| stmt->AssignmentId());
|
| - VisitIterationBody(stmt, &for_loop);
|
| + VisitIterationBody(stmt, &for_loop, stmt->StackCheckId());
|
| }
|
| test_value.End();
|
| for_loop.EndBody();
|
| @@ -1470,7 +1470,7 @@ void AstGraphBuilder::VisitForOfStatement(ForOfStatement* stmt) {
|
| Node* condition = environment()->Pop();
|
| for_loop.BreakWhen(condition);
|
| VisitForEffect(stmt->assign_each());
|
| - VisitIterationBody(stmt, &for_loop);
|
| + VisitIterationBody(stmt, &for_loop, stmt->StackCheckId());
|
| for_loop.EndBody();
|
| for_loop.EndLoop();
|
| }
|
| @@ -2966,13 +2966,13 @@ void AstGraphBuilder::VisitInScope(Statement* stmt, Scope* s, Node* context) {
|
| Visit(stmt);
|
| }
|
|
|
| -
|
| void AstGraphBuilder::VisitIterationBody(IterationStatement* stmt,
|
| - LoopBuilder* loop) {
|
| + LoopBuilder* loop,
|
| + BailoutId stack_check_id) {
|
| ControlScopeForIteration scope(this, stmt, loop);
|
| if (FLAG_turbo_loop_stackcheck || !info()->shared_info()->asm_function()) {
|
| Node* node = NewNode(javascript()->StackCheck());
|
| - PrepareFrameState(node, stmt->StackCheckId());
|
| + PrepareFrameState(node, stack_check_id);
|
| }
|
| Visit(stmt->body());
|
| }
|
|
|