|
This patch implements an alternative approach to the rewriting
of non-pattern expressions, according to the (internally circulated)
design document. Details to be provided here.
1. RewritableAssignmentExpression has been renamed to RewritableExpression.
It is a wrapper for AST nodes that wait for some potential rewriting
(that may or may not happen). Also, Is... and As... macros now see
through RewritableExpressions.
2. The function state keeps a list of rewritable expressions that must be
rewritten only if they are used as non-pattern expressions.
3. Expression classifiers are now templates, parameterized by parser
traits. They keep some additional state: a pointer to the list of
non-pattern rewritable expressions. It is important that expression
classifiers be used strictly in a stack fashion, from now on.
4. The RewriteNonPattern function has been simplified.
BUG= chromium:579913
LOG=N
Committed: https://crrev.com/7f5c864a6faf2b957b7273891e143b9bde35487c
Cr-Commit-Position: refs/heads/master@{#34154}
Committed: https://crrev.com/ed665880416e5ece6561ab128b506896e2079809
Cr-Commit-Position: refs/heads/master@{#34162}
Total comments: 11
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+359 lines, -279 lines) |
Patch |
|
M |
src/ast/ast.h
|
View
|
1
2
|
6 chunks |
+69 lines, -20 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-expression-rewriter.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-expression-visitor.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-literal-reindexer.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-numbering.cc
|
View
|
1
2
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/ast/prettyprinter.cc
|
View
|
1
2
|
3 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-graph-builder.cc
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-loop-assignment-analyzer.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/crankshaft/hydrogen.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/crankshaft/typing.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/full-codegen.cc
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.cc
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/parsing/expression-classifier.h
|
View
|
|
6 chunks |
+50 lines, -21 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.h
|
View
|
1
2
|
7 chunks |
+16 lines, -14 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser.cc
|
View
|
1
2
3
|
21 chunks |
+63 lines, -66 lines |
0 comments
|
Download
|
|
M |
src/parsing/parser-base.h
|
View
|
1
2
|
46 chunks |
+94 lines, -77 lines |
0 comments
|
Download
|
|
M |
src/parsing/pattern-rewriter.cc
|
View
|
1
|
4 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/parsing/preparser.h
|
View
|
1
2
|
6 chunks |
+20 lines, -20 lines |
0 comments
|
Download
|
|
M |
src/parsing/preparser.cc
|
View
|
1
2
|
12 chunks |
+16 lines, -18 lines |
0 comments
|
Download
|
|
M |
src/typing-asm.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/wasm/asm-wasm-builder.cc
|
View
|
1
2
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
Total messages: 34 (17 generated)
|