| Index: src/compiler/ast-graph-builder.cc
|
| diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
|
| index be6c358617b782a0188170f2e96311db6621cc51..817d0d3fc6767e9c73244e3a69c857757441264c 100644
|
| --- a/src/compiler/ast-graph-builder.cc
|
| +++ b/src/compiler/ast-graph-builder.cc
|
| @@ -1349,7 +1349,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();
|
| @@ -1364,7 +1364,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();
|
| }
|
| @@ -1381,7 +1381,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();
|
| @@ -1458,7 +1458,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();
|
| @@ -1484,7 +1484,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();
|
| }
|
| @@ -2983,13 +2983,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());
|
| }
|
|
|