Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 2126233002: Devirtualize AstNode and subclasses, except for visiting-related methods. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove static assert again Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/crankshaft/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/crankshaft/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698