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

Issue 14582007: Implement yield* (delegating yield) (Closed)

Created:
7 years, 7 months ago by wingo
Modified:
7 years, 7 months ago
CC:
Michael Starzinger
Base URL:
git://github.com/v8/v8.git@master
Visibility:
Public.

Description

Implement yield* (delegating yield) Ideally this would have been implemented via desugaring at parse-time, but yield* is an expression, and its desugaring includes statements like while and try/catch. We'd have to have BlockExpression in the AST to support that, and it's not worth it for this feature. So instead we implement all of the logic in FullCodeGenerator::VisitYield. Delegating yield AST nodes now have a try handler index, for the try/catch. Otherwise the implementation is straightforward. R=rossberg@chromium.org BUG=v8:2355 TEST=mjsunit/harmony/generators-iteration Committed: 14669

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fix asm nits; rework test suite to test yield* on everything #

Unified diffs Side-by-side diffs Delta from patch set Stats (+520 lines, -176 lines) Patch
M src/arm/full-codegen-arm.cc View 1 1 chunk +96 lines, -2 lines 0 comments Download
M src/ast.h View 2 chunks +14 lines, -0 lines 0 comments Download
M src/heap.h View 1 chunk +5 lines, -1 line 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 1 chunk +89 lines, -2 lines 0 comments Download
M src/parser.cc View 1 chunk +6 lines, -1 line 0 comments Download
M src/v8natives.js View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/x64/full-codegen-x64.cc View 1 1 chunk +90 lines, -2 lines 0 comments Download
M test/mjsunit/harmony/generators-iteration.js View 1 3 chunks +220 lines, -167 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
wingo
Based on https://codereview.chromium.org/14031028/. PTAL :)
7 years, 7 months ago (2013-05-02 17:29:54 UTC) #1
Michael Starzinger
Andreas has agreed to take a look at this one. Thanks!
7 years, 7 months ago (2013-05-07 10:19:31 UTC) #2
rossberg
https://codereview.chromium.org/14582007/diff/1/src/ia32/full-codegen-ia32.cc File src/ia32/full-codegen-ia32.cc (right): https://codereview.chromium.org/14582007/diff/1/src/ia32/full-codegen-ia32.cc#newcode1936 src/ia32/full-codegen-ia32.cc:1936: // catch (e) { receiver = iter; f = ...
7 years, 7 months ago (2013-05-13 11:14:55 UTC) #3
wingo
Updated patch fixes nits and really puts yield* through the wringer. Please take a look ...
7 years, 7 months ago (2013-05-14 14:02:07 UTC) #4
rossberg
lgtm
7 years, 7 months ago (2013-05-14 14:22:53 UTC) #5
wingo
7 years, 7 months ago (2013-05-14 16:27:07 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r14669 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698