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

Unified Diff: src/ast/ast-expression-visitor.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 | « src/ast/ast.cc ('k') | src/ast/ast-expression-visitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast-expression-visitor.h
diff --git a/src/ast/ast-expression-visitor.h b/src/ast/ast-expression-visitor.h
index 283bc7bfd24502be226a6e05d65fb0fccfd2009b..3f7b9f7734a099c5e0baea91357b029ef8e26ddf 100644
--- a/src/ast/ast-expression-visitor.h
+++ b/src/ast/ast-expression-visitor.h
@@ -17,7 +17,7 @@ namespace internal {
// A Visitor over a CompilationInfo's AST that invokes
// VisitExpression on each expression node.
-class AstExpressionVisitor : public AstVisitor {
+class AstExpressionVisitor : public AstTraversalVisitor {
public:
AstExpressionVisitor(Isolate* isolate, Expression* root);
AstExpressionVisitor(uintptr_t stack_limit, Expression* root);
@@ -25,20 +25,13 @@ class AstExpressionVisitor : public AstVisitor {
protected:
virtual void VisitExpression(Expression* expression) = 0;
- int depth() { return depth_; }
-
- void VisitDeclarations(ZoneList<Declaration*>* d) override;
- void VisitStatements(ZoneList<Statement*>* s) override;
private:
- DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
-
#define DECLARE_VISIT(type) void Visit##type(type* node) override;
- AST_NODE_LIST(DECLARE_VISIT)
+ EXPRESSION_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
Expression* root_;
- int depth_;
DISALLOW_COPY_AND_ASSIGN(AstExpressionVisitor);
};
« no previous file with comments | « src/ast/ast.cc ('k') | src/ast/ast-expression-visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698