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

Issue 14066016: Generators can resume (Closed)

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

Description

Generators can resume The generator object methods "next", "send", and "throw" now include some inline assembly to set up a resumed stack frame. In some common cases, we can just jump back into the frame to resume it. Otherwise the resume code calls out to a runtime to fill in the operand stack, rewind the handlers, and possibly to throw an exception. BUG=v8:2355 TESTS=mjsunit/harmony/generators-iteration Committed: http://code.google.com/p/v8/source/detail?r=14415

Patch Set 1 #

Patch Set 2 : Remove close(); add tests; implement throw(); implement generator states #

Patch Set 3 : Add missing test file #

Patch Set 4 : Rebase; some changes were incorporated into other CLs #

Patch Set 5 : Don't fuzz %_GeneratorSend / %_GeneratorThrow #

Patch Set 6 : Harmonize throw() tests with next()/send() tests #

Patch Set 7 : Add ARM port (untested) #

Patch Set 8 : Rebase now that the suspend patch has landed #

Patch Set 9 : Fix to use sentinel values #

Patch Set 10 : ia32 fixups #

Total comments: 26

Patch Set 11 : React to feedback; rewrite tests #

Patch Set 12 : Fix attempted use of new() in tests #

Total comments: 2

Patch Set 13 : Use Abort() instead of int3() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+647 lines, -18 lines) Patch
M src/arm/full-codegen-arm.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +92 lines, -0 lines 0 comments Download
M src/full-codegen.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M src/full-codegen.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +14 lines, -0 lines 0 comments Download
M src/generator.js View 1 2 3 4 chunks +4 lines, -14 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +92 lines, -0 lines 0 comments Download
M src/messages.js View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M src/runtime.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -1 line 0 comments Download
M src/runtime.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +59 lines, -0 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +93 lines, -0 lines 0 comments Download
M test/mjsunit/fuzz-natives-part4.js View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/generators-iteration.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +261 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/generators-runtime.js View 1 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
wingo
This is an early patch that I am pushing out for comments. Still to be ...
7 years, 8 months ago (2013-04-16 15:25:47 UTC) #1
wingo
Updated patch removes the close() function, implements throw(), and correctly tracks generator states (suspended, running, ...
7 years, 8 months ago (2013-04-17 13:57:32 UTC) #2
wingo
Updated patch removes changes that were incorporated into r14309 and https://codereview.chromium.org/13704010/.
7 years, 8 months ago (2013-04-17 15:39:04 UTC) #3
wingo
Updated patch adds untested ARM port. Now ready for review, once https://codereview.chromium.org/13704010 sorts itself out.
7 years, 8 months ago (2013-04-18 10:55:23 UTC) #4
wingo
Updated patch applies against master and uses the new sentinel values.
7 years, 8 months ago (2013-04-19 15:34:31 UTC) #5
Michael Starzinger
First round of comments. Mainly the test-coverage should be increased. I left comments about some ...
7 years, 8 months ago (2013-04-21 22:45:21 UTC) #6
wingo
Updated patch addresses comments, except the assertThrows() comment which I didn't fully understand. Also, access ...
7 years, 8 months ago (2013-04-23 13:51:04 UTC) #7
Michael Starzinger
LGTM. Just one minor nit. I'll land this once the nit is addressed. Awesome work. ...
7 years, 8 months ago (2013-04-24 12:08:43 UTC) #8
wingo
Thanks for the review :) Updated patch fixes nit. https://codereview.chromium.org/14066016/diff/49001/src/ia32/full-codegen-ia32.cc File src/ia32/full-codegen-ia32.cc (right): https://codereview.chromium.org/14066016/diff/49001/src/ia32/full-codegen-ia32.cc#newcode2020 src/ia32/full-codegen-ia32.cc:2020: ...
7 years, 8 months ago (2013-04-24 12:21:03 UTC) #9
Michael Starzinger
7 years, 8 months ago (2013-04-24 13:00:29 UTC) #10
Message was sent while issue was closed.
Committed patchset #13 manually as r14415 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698