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

Unified Diff: src/flow-graph.cc

Issue 1567007: Move the AstVisitor stack check from Accept to Visit. (Closed)
Patch Set: Created 10 years, 9 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/ast.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/flow-graph.cc
diff --git a/src/flow-graph.cc b/src/flow-graph.cc
index 0b034e2f17f29582d9a20794cf9f8ee644152cae..02a2cd9cfe53369abb64a296090dd04907c1a510 100644
--- a/src/flow-graph.cc
+++ b/src/flow-graph.cc
@@ -433,9 +433,7 @@ void FlowGraphBuilder::VisitThisFunction(ThisFunction* expr) {
#ifdef DEBUG
-// Print a textual representation of an instruction in a flow graph. Using
-// the AstVisitor is overkill because there is no recursion here. It is
-// however only used for printing in debug mode.
+// Print a textual representation of an instruction in a flow graph.
class InstructionPrinter: public AstVisitor {
public:
InstructionPrinter() {}
@@ -594,7 +592,7 @@ void InstructionPrinter::VisitVariableProxy(VariableProxy* expr) {
PrintF("%s", *var->name()->ToCString());
} else {
ASSERT(expr->AsProperty() != NULL);
- VisitProperty(expr->AsProperty());
+ Visit(expr->AsProperty());
}
}
@@ -726,7 +724,7 @@ int BasicBlock::PrintAsText(int instruction_number) {
for (int i = 0; i < instructions_.length(); ++i) {
PrintF("\n%d ", instruction_number);
instructions_[i]->set_num(instruction_number++);
- printer.Visit(instructions_[i]);
+ instructions_[i]->Accept(&printer);
}
// If this is the exit, print "exit". If there is a single successor,
« no previous file with comments | « src/ast.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698