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

Issue 14031028: Generators save and restore stack handlers (Closed)

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

Description

Generators save and restore stack handlers This CL adds machinery to unwind stack handlers from the stack and store them into a generator's operand array. It also includes routines to reinstate them. Together this allows generators to yield within try/catch and try/finally blocks. BUG=v8:2355 R=mstarzinger@chromium.org TEST=mjsunit/harmony/generators-iteration Committed: 14586

Patch Set 1 #

Patch Set 2 : Don't skip write barrier #

Patch Set 3 : Rebase to have the test suite expect boxed return values #

Total comments: 10

Patch Set 4 : Fix nits; store handler index and kind in separate slots #

Patch Set 5 : Use int instead of Smi* in Unwind / Rewind #

Total comments: 6

Patch Set 6 : Fix nits #

Patch Set 7 : Rebased before commit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+401 lines, -31 lines) Patch
M src/frames.h View 1 2 3 4 3 chunks +11 lines, -0 lines 0 comments Download
M src/frames.cc View 1 2 3 4 5 2 chunks +120 lines, -0 lines 0 comments Download
M src/frames-inl.h View 1 2 3 2 chunks +9 lines, -2 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 2 chunks +9 lines, -2 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 6 3 chunks +9 lines, -17 lines 0 comments Download
M src/v8memory.h View 1 chunk +8 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/generators-iteration.js View 1 2 3 4 5 6 5 chunks +233 lines, -10 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
wingo
The last major piece of basic generators functionality, I think. Enjoy!
7 years, 7 months ago (2013-04-26 14:12:48 UTC) #1
wingo
Updated patch doesn't skip the write barrier when saving the operand stack.
7 years, 7 months ago (2013-04-29 14:09:00 UTC) #2
wingo
Updated patch rebased on top of https://codereview.chromium.org/13870007/.
7 years, 7 months ago (2013-05-02 15:53:06 UTC) #3
Michael Starzinger
https://codereview.chromium.org/14031028/diff/6001/src/frames.cc File src/frames.cc (right): https://codereview.chromium.org/14031028/diff/6001/src/frames.cc#newcode852 src/frames.cc:852: const int kStackHandlerSlotCount = Move the "kStackHandlerSlotCount" constant into ...
7 years, 7 months ago (2013-05-07 09:55:44 UTC) #4
wingo
Updated patch addresses comments. By re-using the slot that holds the FP when a stack ...
7 years, 7 months ago (2013-05-07 12:40:31 UTC) #5
wingo
Following your suggestion to change to Smi* instead of Object*, it seems clearer if Unwind ...
7 years, 7 months ago (2013-05-07 13:09:27 UTC) #6
Michael Starzinger
LGTM if final nits are addressed. The new way of storing the state split into ...
7 years, 7 months ago (2013-05-07 20:21:18 UTC) #7
Michael Starzinger
LGTM. https://codereview.chromium.org/14031028/diff/16001/src/frames.cc File src/frames.cc (right): https://codereview.chromium.org/14031028/diff/16001/src/frames.cc#newcode1521 src/frames.cc:1521: array->set(offset + 2, Smi::FromInt(static_cast<int>(index()))); // state On 2013/05/07 ...
7 years, 7 months ago (2013-05-07 20:25:23 UTC) #8
wingo
7 years, 7 months ago (2013-05-08 08:08:34 UTC) #9
Message was sent while issue was closed.
Committed patchset #7 manually as r14586 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698