['[Generator].prototype.next', this]);
}
+ if (DEBUG_IS_ACTIVE) %DebugPrepareStepInIfStepping(this);
return %_GeneratorNext(this, value);
}
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);