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

Issue 1702063002: Non-pattern rewriting revisited (Closed)

Created:
4 years, 10 months ago by nickie
Modified:
4 years, 10 months ago
CC:
v8-reviews_googlegroups.com, oth, rmcilroy
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

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}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Fixed typo in comment #

Patch Set 3 : Rebase #

Patch Set 4 : Fix a bug I introduced when rebasing #

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

Messages

Total messages: 34 (17 generated)
nickie
https://codereview.chromium.org/1702063002/diff/1/src/parsing/parser-base.h File src/parsing/parser-base.h (left): https://codereview.chromium.org/1702063002/diff/1/src/parsing/parser-base.h#oldcode248 src/parsing/parser-base.h:248: This is not deleted, it is made private.
4 years, 10 months ago (2016-02-17 15:06:20 UTC) #5
rossberg
Looks good mostly nits. https://codereview.chromium.org/1702063002/diff/1/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/1702063002/diff/1/src/ast/ast.h#newcode3534 src/ast/ast.h:3534: AstNode::k##type != AstNode::kRewritableExpression) \ I ...
4 years, 10 months ago (2016-02-18 12:11:32 UTC) #6
nickie
https://codereview.chromium.org/1702063002/diff/1/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/1702063002/diff/1/src/ast/ast.h#newcode3534 src/ast/ast.h:3534: AstNode::k##type != AstNode::kRewritableExpression) \ On 2016/02/18 12:11:31, rossberg wrote: ...
4 years, 10 months ago (2016-02-18 12:53:17 UTC) #7
rossberg
LGTM
4 years, 10 months ago (2016-02-19 12:23:47 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1702063002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1702063002/20001
4 years, 10 months ago (2016-02-19 12:26:46 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/13952) v8_linux64_rel_ng on tryserver.v8 (JOB_FAILED, ...
4 years, 10 months ago (2016-02-19 12:27:46 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1702063002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1702063002/40001
4 years, 10 months ago (2016-02-19 13:35:38 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/11249)
4 years, 10 months ago (2016-02-19 13:43:26 UTC) #18
Benedikt Meurer
LGTM.
4 years, 10 months ago (2016-02-19 13:45:03 UTC) #19
titzer
lgtm
4 years, 10 months ago (2016-02-19 14:00:41 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1702063002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1702063002/40001
4 years, 10 months ago (2016-02-19 14:02:10 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-19 14:03:41 UTC) #23
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/7f5c864a6faf2b957b7273891e143b9bde35487c Cr-Commit-Position: refs/heads/master@{#34154}
4 years, 10 months ago (2016-02-19 14:04:30 UTC) #25
Michael Achenbach
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/1712203002/ by machenbach@chromium.org. ...
4 years, 10 months ago (2016-02-19 15:05:48 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1702063002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1702063002/60001
4 years, 10 months ago (2016-02-19 15:30:03 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-19 15:59:05 UTC) #32
commit-bot: I haz the power
4 years, 10 months ago (2016-02-19 15:59:45 UTC) #34
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/ed665880416e5ece6561ab128b506896e2079809
Cr-Commit-Position: refs/heads/master@{#34162}

Powered by Google App Engine
This is Rietveld 408576698