<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&#64;gmail.com" title="GSkachkov &lt;gskachkov&#64;gmail.com&gt;"> <span class="fn">GSkachkov</span></a>
</span></b>
        <pre>Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=305431&amp;action=diff" name="attach_305431" title="Patch">attachment 305431</a> <a href="attachment.cgi?id=305431&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=305431&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=305431&amp;action=review</a>

<span class="quote">&gt;&gt;&gt; Source/JavaScriptCore/builtins/AsyncGeneratorPrototype.js:77
&gt;&gt;&gt; +    &#64;asyncGeneratorResumeNext(generator);
&gt;&gt; 
&gt;&gt; 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 &quot;evaluate the next item in queue after a yield immediately&quot;.
&gt;&gt; 
&gt;&gt; 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).
&gt; 
&gt; Thanks for quick feedback!
&gt; 
&gt; 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).
&gt; 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>