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

Issue 1643903003: [generators] Desugar yield*. (Closed)

Created:
4 years, 10 months ago by neis
Modified:
4 years, 10 months ago
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

[generators] Desugar yield*. This CL deals with yield* by desugaring it in the parser. Hence the full-codegen implementation of it becomes obsolete and can be removed in a future CL. The only change in semantics should be that the results of the iterator's next and throw methods are checked to be objects, which didn't happen before but is required by the spec. BUG= Committed: https://crrev.com/5269944a18adf88577aa4787586cd8ca92510686 Cr-Commit-Position: refs/heads/master@{#33735}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Share some temporaries. #

Patch Set 3 : Improve comment. #

Patch Set 4 : Another one too. #

Patch Set 5 : Add CHECK to rewriter. #

Total comments: 2

Patch Set 6 : Reuse (slightly generalized) BuildIteratorClose in return case. #

Patch Set 7 : Refer to ResumeMode #

Unified diffs Side-by-side diffs Delta from patch set Stats (+618 lines, -36 lines) Patch
M src/ast/ast-value-factory.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/ast/prettyprinter.cc View 1 chunk +3 lines, -1 line 0 comments Download
M src/messages.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/parsing/parser.h View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 1 chunk +569 lines, -0 lines 0 comments Download
M src/parsing/parser-base.h View 1 chunk +1 line, -4 lines 0 comments Download
M src/parsing/preparser.h View 2 chunks +10 lines, -0 lines 0 comments Download
M src/parsing/rewriter.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M test/mjsunit/es6/generators-iteration.js View 2 chunks +22 lines, -31 lines 0 comments Download

Messages

Total messages: 27 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1643903003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1643903003/1
4 years, 10 months ago (2016-01-28 10:28:20 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-01-28 11:05:38 UTC) #4
neis
https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc#newcode6320 src/parsing/parser.cc:6320: // crashing the rewriter. When just using one normal ...
4 years, 10 months ago (2016-01-28 11:15:13 UTC) #5
neis
PTAL
4 years, 10 months ago (2016-01-28 11:15:45 UTC) #8
Michael Starzinger
Approach looking good. But I am not a parser expert, please wait for sign-off from ...
4 years, 10 months ago (2016-01-29 10:15:40 UTC) #9
rossberg
Mostly looking good. https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc#newcode5804 src/parsing/parser.cc:5804: // loop containing an "raw" yield ...
4 years, 10 months ago (2016-01-29 18:12:28 UTC) #10
neis
https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc#newcode5850 src/parsing/parser.cc:5850: // RawYield(output); On 2016/01/29 18:12:27, rossberg wrote: > What's ...
4 years, 10 months ago (2016-01-31 19:21:50 UTC) #11
Jarin
It is looking good, but I know nearly nothing about parser.
4 years, 10 months ago (2016-02-01 07:44:36 UTC) #12
adamk
Drive-by high-level comment/question... https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc#newcode6339 src/parsing/parser.cc:6339: } This function is almost 500 ...
4 years, 10 months ago (2016-02-01 21:38:42 UTC) #13
neis
> https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc#newcode6320 > src/parsing/parser.cc:6320: // crashing the rewriter. > On 2016/01/29 18:12:27, rossberg wrote: > ...
4 years, 10 months ago (2016-02-03 10:10:34 UTC) #15
Dan Ehrenberg
lgtm Really clean code; I wish the whole parser had this level of comments. Just ...
4 years, 10 months ago (2016-02-04 11:40:32 UTC) #17
rossberg
lgtm
4 years, 10 months ago (2016-02-04 13:21:41 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1643903003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1643903003/140001
4 years, 10 months ago (2016-02-04 13:44:19 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 10 months ago (2016-02-04 14:12:41 UTC) #23
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/5269944a18adf88577aa4787586cd8ca92510686 Cr-Commit-Position: refs/heads/master@{#33735}
4 years, 10 months ago (2016-02-04 14:13:11 UTC) #25
neis
On 2016/02/01 21:38:42, adamk (ooo until feb 10) wrote: > Drive-by high-level comment/question... > > ...
4 years, 10 months ago (2016-02-05 08:33:19 UTC) #26
adamk
4 years, 10 months ago (2016-02-10 18:36:20 UTC) #27
Message was sent while issue was closed.
On 2016/02/05 08:33:19, neis wrote:
> On 2016/02/01 21:38:42, adamk (ooo until feb 10) wrote:
> > Drive-by high-level comment/question...
> > 
> > https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc
> > File src/parsing/parser.cc (right):
> > 
> >
>
https://codereview.chromium.org/1643903003/diff/1/src/parsing/parser.cc#newco...
> > src/parsing/parser.cc:6339: }
> > This function is almost 500 lines long. Should we consider adding some
> > infrastructure to make writing (and reading) these desugarings easier?
> 
> Do you have concrete ideas for that?  If not, maybe a good time to do this
kind
> of thing is when the parser rewrite is on the agenda again.

Not super concrete, no; I imagine we'd build some helper classes that would do
the AST generation but have an interface that's less verbose than the
AstNodeFactory (and the nodes themselves). Putting it on the "parser rewrite"
agenda seems reasonable.

Powered by Google App Engine
This is Rietveld 408576698