| Index: src/generator.js
|
| diff --git a/src/generator.js b/src/generator.js
|
| index c152e3a6eea369d4c4306bb946df2d5edeeed29e..3133eddf3f3cea113513095ea167b91c589726da 100644
|
| --- a/src/generator.js
|
| +++ b/src/generator.js
|
| @@ -32,6 +32,10 @@ function GeneratorObjectThrow(exn) {
|
| return %_GeneratorThrow(this, exn);
|
| }
|
|
|
| +function GeneratorObjectIterator() {
|
| + return this;
|
| +}
|
| +
|
| function GeneratorFunctionPrototypeConstructor(x) {
|
| if (%_IsConstructCall()) {
|
| throw MakeTypeError('not_constructor', ['GeneratorFunctionPrototype']);
|
| @@ -56,6 +60,8 @@ function SetUpGenerators() {
|
| DONT_ENUM | DONT_DELETE | READ_ONLY,
|
| ["next", GeneratorObjectNext,
|
| "throw", GeneratorObjectThrow]);
|
| + %SetProperty(GeneratorObjectPrototype, symbolIterator, GeneratorObjectIterator,
|
| + DONT_ENUM | DONT_DELETE | READ_ONLY);
|
| %SetProperty(GeneratorObjectPrototype, "constructor",
|
| GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY);
|
| %SetPrototype(GeneratorFunctionPrototype, $Function.prototype);
|
|
|