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

Issue 1564083002: Add spread rewriting (Closed)

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

Description

Add spread rewriting In short, array literals containing spreads, when used as expressions, are rewritten using do expressions. E.g. [1, 2, 3, ...x, 4, ...y, 5] is roughly rewritten as: do { $R = [1, 2, 3]; for ($i of x) %AppendElement($R, $i); %AppendElement($R, 4); for ($j of y) %AppendElement($R, $j); %AppendElement($R, 5); $R } where $R, $i and $j are fresh temporary variables. R=rossberg@chromium.org BUG= Committed: https://crrev.com/07f1c36273e979d515bee81e9c847ca7dcf27355 Cr-Commit-Position: refs/heads/master@{#33307}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebase to remove things added in separate CLs #

Total comments: 6

Patch Set 3 : Add comments and fix spread error messages #

Patch Set 4 : Rebase (just see comments) #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -13 lines) Patch
M src/ast/ast.h View 1 2 3 3 chunks +20 lines, -4 lines 0 comments Download
M src/parsing/parser.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 3 chunks +164 lines, -3 lines 2 comments Download
M src/parsing/parser-base.h View 1 2 3 6 chunks +8 lines, -5 lines 0 comments Download
M src/parsing/preparser.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 14 (4 generated)
nickie
4 years, 11 months ago (2016-01-07 14:55:53 UTC) #1
nickie
https://codereview.chromium.org/1564083002/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1564083002/diff/1/src/parsing/parser.cc#newcode6517 src/parsing/parser.cc:6517: class SpreadRewriter : public AstExpressionRewriter { For the time ...
4 years, 11 months ago (2016-01-07 16:58:11 UTC) #2
rossberg
lgtm https://codereview.chromium.org/1564083002/diff/40001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1564083002/diff/40001/src/parsing/parser.cc#newcode5442 src/parsing/parser.cc:5442: DCHECK_NOT_NULL(node); Nit: having 2 null checks here may ...
4 years, 11 months ago (2016-01-11 12:50:14 UTC) #4
caitp (gmail)
Does this mean it's safe to delete some code from src/js/spread.js? I think there's at ...
4 years, 11 months ago (2016-01-11 13:59:28 UTC) #5
nickie
On 2016/01/11 13:59:28, caitp wrote: > Does this mean it's safe to delete some code ...
4 years, 11 months ago (2016-01-12 12:11:16 UTC) #6
nickie
https://codereview.chromium.org/1564083002/diff/40001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1564083002/diff/40001/src/parsing/parser.cc#newcode5442 src/parsing/parser.cc:5442: DCHECK_NOT_NULL(node); On 2016/01/11 12:50:14, rossberg wrote: > Nit: having ...
4 years, 11 months ago (2016-01-13 10:15:21 UTC) #7
nickie
https://codereview.chromium.org/1564083002/diff/80001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1564083002/diff/80001/src/parsing/parser.cc#newcode5454 src/parsing/parser.cc:5454: return result; This is almost trivial; rewriting happens after ...
4 years, 11 months ago (2016-01-14 16:35:03 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1564083002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1564083002/80001
4 years, 11 months ago (2016-01-14 17:10:29 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 11 months ago (2016-01-14 17:49:58 UTC) #12
commit-bot: I haz the power
4 years, 11 months ago (2016-01-14 17:50:55 UTC) #14
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/07f1c36273e979d515bee81e9c847ca7dcf27355
Cr-Commit-Position: refs/heads/master@{#33307}

Powered by Google App Engine
This is Rietveld 408576698