<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Arrow function syntax. Arrow function specific features. Lexical bind &quot;super&quot; property"
   href="https://bugs.webkit.org/show_bug.cgi?id=149615#c18">Comment # 18</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Arrow function syntax. Arrow function specific features. Lexical bind &quot;super&quot; property"
   href="https://bugs.webkit.org/show_bug.cgi?id=149615">bug 149615</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="bz_obsolete"><a href="attachment.cgi?id=267799&amp;action=diff" name="attach_267799" title="Patch">attachment 267799</a> <a href="attachment.cgi?id=267799&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt;&gt;&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:813
&gt;&gt;&gt; +                }
&gt;&gt; 
&gt;&gt; Nit: I think this whole section of code would be easier to read like this:
&gt;&gt; ```
&gt;&gt; if (constructorKind() == ConstructorKind::Derived || isDerivedConstructorContext())
&gt;&gt;     newDerivedContextType = DerivedContextType::DerivedConstructorContext;
&gt;&gt; else if (m_codeBlock-&gt;isClassContext() || (m_codeBlock-&gt;isArrowFunction() &amp;&amp; m_derivedContextType == DerivedContextType::DerivedMethodContext))
&gt;&gt;     newDerivedContextType =  DerivedContextType::DerivedMethodContext
&gt;&gt; ```
&gt;&gt; 
&gt;&gt; Also, why do we need to check &quot;m_codeBlock-&gt;isArrowFunction()&quot; when checking &quot;m_derivedContextType == DerivedContextType::DerivedMethodContext&quot;?
&gt;&gt; When would we have &quot;!m_codeBlock-&gt;isArrowFunction() &amp;&amp; m_derivedContextType == DerivedContextType::DerivedMethodContext&quot;?
&gt; 
&gt; Ohh, I see. We don't need to check m_codeBlock-&gt;isArrowFunction() because it already true because of this condition metadata-&gt;parseMode() == SourceParseMode::ArrowFunctionMode.</span >

No, that's not true.
m_codeBlock is the function we're generating code for. metadata is the inner function we're creating.
We could have 'metadata-&gt;parseMode() == ArrowFunctionMode' but also have m_codeBlock be the global scope or an eval or a regular function.
The interesting thing here is m_derivedContextType.

My question is this:
Does 'm_derivedContextType == DerivedContextType::DerivedMethodSyntax' imply that 'm_codeBlock-&gt;isArrowFunction()'?
If that statement is not true, when would we have 'm_derivedContextType == DerivedContextType::DerivedMethodSyntax' but also have '!m_codeBlock-&gt;isArrowFunction()'.
Is that even possible to have DerivedMethodSyntax when the parent function is not an arrow function? This seems like it should be impossible.</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>