<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&#64;igalia.com" title="Caitlin Potter (:caitp) &lt;caitp&#64;igalia.com&gt;"> <span class="fn">Caitlin Potter (:caitp)</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=279829&amp;action=diff" name="attach_279829" title="Patch">attachment 279829</a> <a href="attachment.cgi?id=279829&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=279829&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=279829&amp;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">&gt;&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:656
&gt;&gt; +    if (SourceParseMode::ArrowFunctionMode == parseMode || SourceParseMode::AsyncArrowFunctionBodyMode == parseMode || SourceParseMode::AsyncArrowFunctionMode == parseMode) {
&gt; 
&gt; Please add a comment about why AsyncArrowFunctionBodyMode is listed here.
&gt; (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">&gt;&gt; Source/JavaScriptCore/parser/ASTBuilder.h:386
&gt;&gt; +            usesArrowFunction();
&gt; 
&gt; Is this usesArrowFunction() here correct? These functions are not arrow functions, right?
&gt; 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">&gt;&gt; Source/JavaScriptCore/parser/Parser.cpp:3541
&gt;&gt; +            goto parseProperty;
&gt; 
&gt; Is it safe for `async hello: value` property?
&gt; I think we need to chek !isAsyncMethod in match(COLON) phase to avoid it.
&gt; 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">&gt;&gt; Source/JavaScriptCore/parser/Parser.h:1579
&gt;&gt; +        ASSERT(false);
&gt; 
&gt; 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>