| Index: src/generator.js
|
| diff --git a/src/generator.js b/src/generator.js
|
| index 481d4d37f88f4d2ce3541b5ae04ff13495a4c998..5e61091565567bf9d516a45d0efd72add6aa33af 100644
|
| --- a/src/generator.js
|
| +++ b/src/generator.js
|
| @@ -44,7 +44,7 @@ function GeneratorObjectNext() {
|
| ['[Generator].prototype.next', this]);
|
| }
|
|
|
| - // TODO(wingo): Implement.
|
| + return %_GeneratorSend(this, void 0);
|
| }
|
|
|
| function GeneratorObjectSend(value) {
|
| @@ -53,7 +53,7 @@ function GeneratorObjectSend(value) {
|
| ['[Generator].prototype.send', this]);
|
| }
|
|
|
| - // TODO(wingo): Implement.
|
| + return %_GeneratorSend(this, value);
|
| }
|
|
|
| function GeneratorObjectThrow(exn) {
|
| @@ -62,16 +62,7 @@ function GeneratorObjectThrow(exn) {
|
| ['[Generator].prototype.throw', this]);
|
| }
|
|
|
| - // TODO(wingo): Implement.
|
| -}
|
| -
|
| -function GeneratorObjectClose() {
|
| - if (!IS_GENERATOR(this)) {
|
| - throw MakeTypeError('incompatible_method_receiver',
|
| - ['[Generator].prototype.close', this]);
|
| - }
|
| -
|
| - // TODO(wingo): Implement.
|
| + return %_GeneratorThrow(this, exn);
|
| }
|
|
|
| function SetUpGenerators() {
|
| @@ -81,8 +72,7 @@ function SetUpGenerators() {
|
| DONT_ENUM | DONT_DELETE | READ_ONLY,
|
| ["next", GeneratorObjectNext,
|
| "send", GeneratorObjectSend,
|
| - "throw", GeneratorObjectThrow,
|
| - "close", GeneratorObjectClose]);
|
| + "throw", GeneratorObjectThrow]);
|
| %SetProperty(GeneratorObjectPrototype, "constructor",
|
| GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY);
|
| %SetPrototype(GeneratorFunctionPrototype, $Function.prototype);
|
|
|