<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] implement async functions proposal"
href="https://bugs.webkit.org/show_bug.cgi?id=156147#c88">Comment # 88</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] implement async functions proposal"
href="https://bugs.webkit.org/show_bug.cgi?id=156147">bug 156147</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=279829&action=diff" name="attach_279829" title="Patch">attachment 279829</a> <a href="attachment.cgi?id=279829&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=279829&action=review">https://bugs.webkit.org/attachment.cgi?id=279829&action=review</a>
I've run benchmarks (report dumped to <a href="https://gist.github.com/caitp/26b24e076ace641ae7c8a9304da3d07c">https://gist.github.com/caitp/26b24e076ace641ae7c8a9304da3d07c</a>) --- It doesn't look that good, even with the flag.
I'll see if I can improve this a bit tomorrow.
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:656
>> + if (SourceParseMode::ArrowFunctionMode == parseMode || SourceParseMode::AsyncArrowFunctionBodyMode == parseMode || SourceParseMode::AsyncArrowFunctionMode == parseMode) {
>
> Please add a comment about why AsyncArrowFunctionBodyMode is listed here.
> (comment about the system that async arrow function body looks up the arrow function's context).</span >
Done, and added some new tests which go a bit deeper into this (and fixed some bugs related to this)
<span class="quote">>> Source/JavaScriptCore/parser/ASTBuilder.h:386
>> + usesArrowFunction();
>
> Is this usesArrowFunction() here correct? These functions are not arrow functions, right?
> If the body is specially handled, please add a comment about how the body is handled.</span >
It's not needed, removed.
<span class="quote">>> Source/JavaScriptCore/parser/Parser.cpp:3541
>> + goto parseProperty;
>
> Is it safe for `async hello: value` property?
> I think we need to chek !isAsyncMethod in match(COLON) phase to avoid it.
> And please add the test to ensure that JSC makes `async hello: value` case SyntaxError.</span >
You are right... Added a fix and tests or this
<span class="quote">>> Source/JavaScriptCore/parser/Parser.h:1579
>> + ASSERT(false);
>
> should be RELEASE_ASSERT_NOT_REACHED()</span >
Alright</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>