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

Issue 2166333002: [parser] Refactor AstTraversalVisitor (BROKEN) (Closed)

Created:
4 years, 5 months ago by nickie
Modified:
4 years, 5 months ago
Reviewers:
adamk, Toon Verwaest
CC:
v8-reviews_googlegroups.com, Yang
Base URL:
https://chromium.googlesource.com/v8/v8.git@nickie-2169833002-ast-vis
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[parser] Refactor AstTraversalVisitor (BROKEN) This is a rewrite of https://codereview.chromium.org/2169833002 taking a slightly different approach. Instead of having the specific Visit methods in AstTraversalVisitor and using impl() calls while recursing, this patch takes the specific Visits methods to the leaf visitors. It breaks for, e.g., out/Debug/d8 -e 'class C {}; class D extends C { constructor(){ ((q = super()) => q)(); }; }; new D();' because the RECURSE_EXPRESSION(VisitVariableProxy...) calls in VisitSuperCallReference for the parameter initializer Rewriter fail to call its overriden VisitVariableProxy method. I don't think that this can be fixed in a nicer way than 2169833002 but I'm uploading this here for archiving. --- The rest is the CL description of 2169833002 This patch parametrizes AstTraversalVisitor by the actual subclass, in a similar way as AstVisitor is parametrized. This allows a subclass to, e.g., override the Visit method and still use the traversal mechanism. It also allows the subclass to override the specific visiting methods, without them being virtual. This patch also removes AstExpressionVisitor, subsuming its functionality in AstTraversalVisitor. R=adamk@chromium.org, verwaest@chromium.org BUG= LOG=N

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+559 lines, -593 lines) Patch
M BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
M src/ast/ast.h View 6 chunks +22 lines, -48 lines 0 comments Download
M src/ast/ast.cc View 1 chunk +0 lines, -299 lines 0 comments Download
D src/ast/ast-expression-visitor.h View 1 chunk +0 lines, -41 lines 0 comments Download
D src/ast/ast-expression-visitor.cc View 1 chunk +0 lines, -167 lines 0 comments Download
A src/ast/ast-traversal-visitor.h View 1 chunk +503 lines, -0 lines 0 comments Download
M src/compiler.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/debug/liveedit.h View 3 chunks +5 lines, -3 lines 0 comments Download
M src/debug/liveedit.cc View 2 chunks +4 lines, -8 lines 0 comments Download
M src/parsing/parameter-initializer-rewriter.cc View 2 chunks +13 lines, -14 lines 0 comments Download
M src/parsing/parser.cc View 2 chunks +11 lines, -9 lines 0 comments Download
M src/v8.gyp View 1 chunk +0 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 3 (1 generated)
nickie
4 years, 5 months ago (2016-07-21 14:12:46 UTC) #1
nickie
4 years, 5 months ago (2016-07-25 08:38:47 UTC) #2
I'm closing this one, after https://codereview.chromium.org/2169833002 landed.

Powered by Google App Engine
This is Rietveld 408576698