<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#c48">Comment # 48</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:caitp@igalia.com" title="Caitlin Potter (:caitp) <caitp@igalia.com>"> <span class="fn">Caitlin Potter (:caitp)</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=305496&action=diff" name="attach_305496" title="Patch">attachment 305496</a> <a href="attachment.cgi?id=305496&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=305496&action=review">https://bugs.webkit.org/attachment.cgi?id=305496&action=review</a>
Looks good overall, just a couple comments.
Obviously, it would be great if Sam or one of the other JSC core folks could give their opinion on it, since I can't sign off on WebKit patches.
<span class="quote">> Source/JavaScriptCore/builtins/AsyncGeneratorPrototype.js:57
> + @asyncGeneratorResumeNext(generator);</span >
Parameterizing the recursion seems weird to me still. I've suggested some changes that make this unnecessary
<span class="quote">> Source/JavaScriptCore/builtins/AsyncGeneratorPrototype.js:80
> + @asyncGeneratorResumeNext(generator);</span >
ditto here
<span class="quote">> Source/JavaScriptCore/builtins/AsyncGeneratorPrototype.js:114
> + const restartResumeNext = true;</span >
There's no need to recurse here, really. You can just call AsyncGeneratorResumeNext at the end of the method instead (and, you could even PTC to it in that case, since there's no generator on the stack at this point)
<span class="quote">> Source/JavaScriptCore/builtins/AsyncGeneratorPrototype.js:125
> + const restartResumeNext = true;</span >
ditto here</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>