GeneratorFunction() makes generator instances
authorwingo@igalia.com <wingo@igalia.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 12 Jun 2013 12:52:16 +0000 (12:52 +0000)
committerwingo@igalia.com <wingo@igalia.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 12 Jun 2013 12:52:16 +0000 (12:52 +0000)
commitcc27c4c41b165f84c90062dc6d6af5db7e8b5461
tree81c65f28b2ea204f90909ef40e3c134d60ea2a53
parent7ff046c3fdf5f5ae85fbb5b3e4456e464d8b5a1e
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
TEST=mjsunit/harmony/generators-iteration
TEST=mjsunit/harmony/generators-runtime
BUG=v8:2355,v8:2680

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

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