<html>
<head>
<base href="https://bugs.webkit.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ESNext] Async iteration - Implement Async Generator"
href="https://bugs.webkit.org/show_bug.cgi?id=166695#c47">Comment # 47</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [ESNext] Async iteration - Implement Async Generator"
href="https://bugs.webkit.org/show_bug.cgi?id=166695">bug 166695</a>
from <span class="vcard"><a class="email" href="mailto:gskachkov@gmail.com" title="GSkachkov <gskachkov@gmail.com>"> <span class="fn">GSkachkov</span></a>
</span></b>
<pre>Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=305431&action=diff" name="attach_305431" title="Patch">attachment 305431</a> <a href="attachment.cgi?id=305431&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=305431&action=review">https://bugs.webkit.org/attachment.cgi?id=305431&action=review</a>
<span class="quote">>>> Source/JavaScriptCore/builtins/AsyncGeneratorPrototype.js:77
>>> + @asyncGeneratorResumeNext(generator);
>>
>> I think it might be wise to make AsyncGeneratorResumeNext() behave as a loop, so that this recursion can be avoided when there are multiple yields and multiple requests in the queue, unless the spec is changed to get rid of the "evaluate the next item in queue after a yield immediately".
>>
>> I'm sure I've said this in this bug before, but I see that we're still doing this recursively, and without PTC (though I'm not sure if PTC would help much in this case).
>
> Thanks for quick feedback!
>
> Yeah, I remember your comment <a class="bz_bug_link
bz_status_NEW "
title="NEW - [ESNext] Async iteration - Implement Async Generator"
href="show_bug.cgi?id=166695#c39">https://bugs.webkit.org/show_bug.cgi?id=166695#c39</a>, however I've tried to be close to spec as much as I can, so I implemented (p 6.4.3.3.11).
> But you are right, using loop is better in this place, so I'll try to switch to approach with loop.</span >
I added loop into AsyncGeneratorResumeNext in new patch, hope it decrees recursion level. Could you please take a look if it make sense?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>