<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:sbarati&#64;apple.com" title="Saam Barati &lt;sbarati&#64;apple.com&gt;"> <span class="fn">Saam Barati</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Arrow function syntax. Emit loading&amp;putting this/super only if they are used in arrow function"
   href="https://bugs.webkit.org/show_bug.cgi?id=153981">bug 153981</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #271854 Flags</td>
           <td>review?, commit-queue?
           </td>
           <td>review+, commit-queue-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Arrow function syntax. Emit loading&amp;putting this/super only if they are used in arrow function"
   href="https://bugs.webkit.org/show_bug.cgi?id=153981#c19">Comment # 19</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Arrow function syntax. Emit loading&amp;putting this/super only if they are used in arrow function"
   href="https://bugs.webkit.org/show_bug.cgi?id=153981">bug 153981</a>
              from <span class="vcard"><a class="email" href="mailto:sbarati&#64;apple.com" title="Saam Barati &lt;sbarati&#64;apple.com&gt;"> <span class="fn">Saam Barati</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=271854&amp;action=diff" name="attach_271854" title="Patch">attachment 271854</a> <a href="attachment.cgi?id=271854&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

r=me w/ comments.

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4050
&gt; +    return m_codeBlock-&gt;doAnyInnerArrowFunctionsUseNewTarget() || m_codeBlock-&gt;doAnyInnerArrowFunctionsUseSuperCall() || m_codeBlock-&gt;doAnyInnerArrowFunctionsUseEval();</span >

I was wrong about this. new.target is prohibited inside eval. Sorry for stating the wrong thing in my previous review.

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4055
&gt; +    return m_codeBlock-&gt;doAnyInnerArrowFunctionsUseSuperCall() || m_codeBlock-&gt;doAnyInnerArrowFunctionsUseSuperProperty() || m_codeBlock-&gt;doAnyInnerArrowFunctionsUseEval() || m_codeBlock-&gt;usesEval();</span >

Also, 'super' isn't allowed inside an eval. It's a SyntaxError.

<span class="quote">&gt; Source/JavaScriptCore/parser/Parser.h:473
&gt; +        if (m_isArrowFunction &amp;&amp; m_usesEval)
&gt; +            setInnerArrowFunctionUseEval();
&gt; +        
&gt; +        if (m_isArrowFunction &amp;&amp; m_vm-&gt;propertyNames-&gt;arguments == *ident)
&gt; +            setInnerArrowFunctionUseArgumetns();</span >

An alternative to doing this at every useVariable(.) call
is to just do it once when popScope happens.

<span class="quote">&gt; Source/JavaScriptCore/parser/Parser.h:953
&gt; +        // We do not up arrow function features for ordinary function</span >

comment not needed.</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>