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

Unified Diff: src/ast/ast.h

Issue 2004363002: Refactor duplicate logic in Ast{Traversal,Expression}Visitor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undefine utility macros Created 4 years, 7 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 | « no previous file | src/ast/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index 1818aa7df227a1d572965c9d62ccca57ca080267..f02def78a8cfcb79892761b1e4a659bffd62089c 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -3056,20 +3056,26 @@ class AstVisitor BASE_EMBEDDED {
class AstTraversalVisitor : public AstVisitor {
public:
explicit AstTraversalVisitor(Isolate* isolate);
+ explicit AstTraversalVisitor(uintptr_t stack_limit);
virtual ~AstTraversalVisitor() {}
// Iteration left-to-right.
void VisitDeclarations(ZoneList<Declaration*>* declarations) override;
void VisitStatements(ZoneList<Statement*>* statements) override;
- void VisitExpressions(ZoneList<Expression*>* expressions) override;
// Individual nodes
#define DECLARE_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
+ protected:
+ int depth() { return depth_; }
+
private:
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
+
+ int depth_;
+
DISALLOW_COPY_AND_ASSIGN(AstTraversalVisitor);
};
« no previous file with comments | « no previous file | src/ast/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698