GeneratorFunction() makes generator instances
authorwingo@igalia.com <wingo@igalia.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 15 May 2013 13:22:05 +0000 (13:22 +0000)
committerwingo@igalia.com <wingo@igalia.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 15 May 2013 13:22:05 +0000 (13:22 +0000)
commite24cc3201175afabb5f56036b0564b542049bea2
treeb518c2ac0da92ab95f1e31849654ed34d92dcb35
parent2d0bddfc80c752c30b034a7e00b4513617123fa2
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

Review URL: https://codereview.chromium.org/14857009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/generator.js
src/v8natives.js
test/mjsunit/harmony/generators-iteration.js
test/mjsunit/harmony/generators-runtime.js