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

Issue 14857009: GeneratorFunction() makes generator instances (Closed)

Created:
7 years, 7 months ago by wingo
Modified:
7 years, 7 months ago
CC:
Michael Starzinger
Visibility:
Public.

Description

GeneratorFunction() makes generator instances The current specification has GeneratorFunction() be like Function(), except that it makes generator instances. This commit implements that behavior. It also fills in a piece of the implementation where otherwise calling GeneratorFunction or GeneratorFunctionPrototype would cause an abort because they have no code. R=mstarzinger@chromium.org, rossberg@chromium.org TEST=mjsunit/harmony/generators-iteration TEST=mjsunit/harmony/generators-runtime BUG=v8:2355 BUG=v8:2680 Committed: http://code.google.com/p/v8/source/detail?r=14684

Patch Set 1 #

Total comments: 13

Patch Set 2 : React to feedback #

Total comments: 1

Patch Set 3 : Pass arguments object to helper #

Total comments: 1

Patch Set 4 : Fix nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -9 lines) Patch
M src/generator.js View 1 2 2 chunks +13 lines, -0 lines 0 comments Download
M src/v8natives.js View 1 2 3 2 chunks +15 lines, -9 lines 0 comments Download
M test/mjsunit/harmony/generators-iteration.js View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/generators-runtime.js View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
wingo
Please take a look. This CL depends on https://codereview.chromium.org/14829005/. Cheers, Andy
7 years, 7 months ago (2013-05-10 09:29:17 UTC) #1
rossberg
https://codereview.chromium.org/14857009/diff/1/src/generator.js File src/generator.js (right): https://codereview.chromium.org/14857009/diff/1/src/generator.js#newcode76 src/generator.js:76: if (n) { Nit: n > 0 https://codereview.chromium.org/14857009/diff/1/src/v8natives.js File ...
7 years, 7 months ago (2013-05-13 11:33:46 UTC) #2
Michael Starzinger
https://codereview.chromium.org/14857009/diff/1/src/v8natives.js File src/v8natives.js (right): https://codereview.chromium.org/14857009/diff/1/src/v8natives.js#newcode1785 src/v8natives.js:1785: function NewFunction(arg1) { // length == 1 Since we ...
7 years, 7 months ago (2013-05-13 11:35:39 UTC) #3
wingo
Fixed nits. WDYT? Some comments inline. https://codereview.chromium.org/14857009/diff/1/src/generator.js File src/generator.js (right): https://codereview.chromium.org/14857009/diff/1/src/generator.js#newcode76 src/generator.js:76: if (n) { ...
7 years, 7 months ago (2013-05-14 10:11:50 UTC) #4
Michael Starzinger
One more comment from my end. Otherwise I would be fine with this change. But ...
7 years, 7 months ago (2013-05-14 13:51:31 UTC) #5
rossberg
https://codereview.chromium.org/14857009/diff/1/src/v8natives.js File src/v8natives.js (right): https://codereview.chromium.org/14857009/diff/1/src/v8natives.js#newcode1787 src/v8natives.js:1787: if (n) { On 2013/05/14 10:11:50, wingo wrote: > ...
7 years, 7 months ago (2013-05-14 14:05:46 UTC) #6
wingo
Probably need to handle https://codereview.chromium.org/14668013/ first; Michael mentioned that he might want to back-port that ...
7 years, 7 months ago (2013-05-15 08:43:16 UTC) #7
wingo
New patch just passes arguments object to helper. Note that it is rebased. PTAL :)
7 years, 7 months ago (2013-05-15 12:02:10 UTC) #8
rossberg
lgtm
7 years, 7 months ago (2013-05-15 12:29:35 UTC) #9
Michael Starzinger
LGTM with a nit. I really hope this doesn't tank performance as mentioned in one ...
7 years, 7 months ago (2013-05-15 12:32:02 UTC) #10
wingo
7 years, 7 months ago (2013-05-15 13:22:14 UTC) #11
Message was sent while issue was closed.
Committed patchset #4 manually as r14684 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698