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

Issue 16801006: Allocate generator result objects before unwinding try handlers (Closed)

Created:
7 years, 6 months ago by wingo
Modified:
7 years, 6 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev, Jakob Kummerow
Visibility:
Public.

Description

Allocate generator result objects before unwinding try handlers When a generator suspends, it saves its state out to the heap and unwinds try handlers but doesn't pop anything off the stack. Instead it relies on no GC happening between the suspend and the return from the generator. However this was not the case: boxing the result object could cause GC, which would try to traverse the stack but would misinterpret words from unwound try handlers as heap objects. This CL changes to allocate the result objects before the suspend. It also removes the generators-iteration skip introduced in r15065. R=mstarzinger@chromium.org TEST=mjsunit/harmony/generators-iteration BUG= Committed: http://code.google.com/p/v8/source/detail?r=15079

Patch Set 1 #

Total comments: 1

Patch Set 2 : Switch fallthrough for yield boxing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -114 lines) Patch
M src/arm/full-codegen-arm.cc View 1 7 chunks +24 lines, -33 lines 0 comments Download
M src/full-codegen.h View 2 chunks +9 lines, -4 lines 0 comments Download
M src/full-codegen.cc View 2 chunks +9 lines, -7 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 6 chunks +24 lines, -33 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 6 chunks +24 lines, -33 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
wingo
7 years, 6 months ago (2013-06-12 10:27:38 UTC) #1
Michael Starzinger
Lookgin good already, just one comment. https://codereview.chromium.org/16801006/diff/1/src/ia32/full-codegen-ia32.cc File src/ia32/full-codegen-ia32.cc (right): https://codereview.chromium.org/16801006/diff/1/src/ia32/full-codegen-ia32.cc#newcode1955 src/ia32/full-codegen-ia32.cc:1955: if (expr->yield_kind() == ...
7 years, 6 months ago (2013-06-12 10:47:56 UTC) #2
Michael Starzinger
LGTM.
7 years, 6 months ago (2013-06-12 10:58:52 UTC) #3
wingo
7 years, 6 months ago (2013-06-12 11:03:02 UTC) #4
Message was sent while issue was closed.
Committed patchset #2 manually as r15079 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698