|
Templatize AstVisitor with its subclass
This replaces the vtable on AstNode with a NodeType tag. The visitors replace double dispatch with a single switch over the NodeType.
For now, visitors with subclasses still have virtual methods themselves. We should probably specialize them later as well.
The uint8_t NodeType allows us to better pack memory, saving 8-16 bytes on many AST nodes (with additional packing that I'll do in a follow-up CL)
BUG=
Committed: https://crrev.com/ebf166df3f34a904c2261e618a2e51afc4613445
Cr-Commit-Position: refs/heads/master@{#37788}
Total comments: 23
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+303 lines, -315 lines) |
Patch |
|
M |
src/asmjs/asm-wasm-builder.cc
|
View
|
1
|
28 chunks |
+52 lines, -65 lines |
0 comments
|
Download
|
|
M |
src/ast/ast.h
|
View
|
1
2
|
64 chunks |
+158 lines, -111 lines |
0 comments
|
Download
|
|
M |
src/ast/ast.cc
|
View
|
1
|
7 chunks |
+4 lines, -47 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-expression-rewriter.h
|
View
|
1
2
|
2 chunks |
+10 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-literal-reindexer.h
|
View
|
|
2 chunks |
+6 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-literal-reindexer.cc
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-numbering.cc
|
View
|
1
|
3 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/ast/prettyprinter.h
|
View
|
1
2
|
4 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-graph-builder.h
|
View
|
1
2
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-graph-builder.cc
|
View
|
1
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-loop-assignment-analyzer.h
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/crankshaft/hydrogen.h
|
View
|
1
2
|
4 chunks |
+8 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/crankshaft/hydrogen.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/crankshaft/typing.h
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/full-codegen.h
|
View
|
1
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/full-codegen.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.h
|
View
|
1
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.h
|
View
|
|
5 chunks |
+9 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.cc
|
View
|
1
|
2 chunks |
+6 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser-base.h
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/parsing/pattern-rewriter.cc
|
View
|
1
|
2 chunks |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
src/parsing/preparser.h
|
View
|
1
|
1 chunk |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/parsing/rewriter.cc
|
View
|
|
3 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
Total messages: 19 (9 generated)
|