| Index: src/generator.js
|
| diff --git a/src/generator.js b/src/generator.js
|
| index c62fe2c771389db255528087262c9ead49d55b39..c94c4ff0db1d1fe59e9bdbd932e935e69a1d2d91 100644
|
| --- a/src/generator.js
|
| +++ b/src/generator.js
|
| @@ -57,11 +57,19 @@ function GeneratorFunctionConstructor(arg1) { // length == 1
|
|
|
| function SetUpGenerators() {
|
| %CheckIsBootstrapping();
|
| +
|
| + // Both Runtime_GeneratorNext and Runtime_GeneratorThrow are supported by
|
| + // neither Crankshaft nor TurboFan, disable optimization of wrappers here.
|
| + %NeverOptimizeFunction(GeneratorObjectNext);
|
| + %NeverOptimizeFunction(GeneratorObjectThrow);
|
| +
|
| + // Set up non-enumerable functions on the generator prototype object.
|
| var GeneratorObjectPrototype = GeneratorFunctionPrototype.prototype;
|
| InstallFunctions(GeneratorObjectPrototype,
|
| DONT_ENUM | DONT_DELETE | READ_ONLY,
|
| ["next", GeneratorObjectNext,
|
| "throw", GeneratorObjectThrow]);
|
| +
|
| %FunctionSetName(GeneratorObjectIterator, '[Symbol.iterator]');
|
| %AddNamedProperty(GeneratorObjectPrototype, symbolIterator,
|
| GeneratorObjectIterator, DONT_ENUM | DONT_DELETE | READ_ONLY);
|
|
|