[Webkit-unassigned] [Bug 166695] [ESNext] Async iteration - Implement Async Generator
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 5 20:27:17 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=166695
--- Comment #2 from Caitlin Potter (:caitp) <caitp at igalia.com> ---
Comment on attachment 298142
--> https://bugs.webkit.org/attachment.cgi?id=298142
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=298142&action=review
Cool stuff so far. I'd like to look at this more on Friday.
> Source/JavaScriptCore/builtins/AsyncGeneratorPrototype.js:39
> + @throwTypeError("Async generator is executing");
Async Generators differ from ordinary generators, in that it's not an error to resume the generator while it's executing.
While it's an unlikely case, the generator is allowed to queue up additional requests while executing, and the queue of requests is drained during resumption (the proposal words this as recursive calls from AsyncGeneratorResolve / AsyncGeneratorReject -> AsyncGeneratorResumeNext)
> Source/JavaScriptCore/builtins/AsyncGeneratorPrototype.js:65
> + if (generator. at asyncGeneratorState === @AsyncGeneratorStateAwait) {
the special generator continuation is a nice idea.
Though it doesn't affect JSC just yet due to not being implemented, note that this would _probably_ be observable via the function.sent metaproperty (or at least, it is in the v8 generator implementation without some additional work).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170106/41ad211f/attachment.html>
More information about the webkit-unassigned
mailing list