<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mark.lam&#64;apple.com" title="Mark Lam &lt;mark.lam&#64;apple.com&gt;"> <span class="fn">Mark Lam</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [JSC] Remove unnecessary condition from needsDerivedConstructorInArrowFunctionLexicalEnvironment in BytecodeGenerator.cpp"
   href="https://bugs.webkit.org/show_bug.cgi?id=169832">bug 169832</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 #304865 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 - [JSC] Remove unnecessary condition from needsDerivedConstructorInArrowFunctionLexicalEnvironment in BytecodeGenerator.cpp"
   href="https://bugs.webkit.org/show_bug.cgi?id=169832#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [JSC] Remove unnecessary condition from needsDerivedConstructorInArrowFunctionLexicalEnvironment in BytecodeGenerator.cpp"
   href="https://bugs.webkit.org/show_bug.cgi?id=169832">bug 169832</a>
              from <span class="vcard"><a class="email" href="mailto:mark.lam&#64;apple.com" title="Mark Lam &lt;mark.lam&#64;apple.com&gt;"> <span class="fn">Mark Lam</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=304865&amp;action=diff" name="attach_304865" title="Patch">attachment 304865</a> <a href="attachment.cgi?id=304865&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt; Source/JavaScriptCore/ChangeLog:10
&gt; +        isConstructor.</span >

I think you mean &quot;isClassContext&quot; here.

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1031
&gt; -    if ((isConstructor() &amp;&amp; constructorKind() == ConstructorKind::Extends) || m_codeBlock-&gt;isClassContext()) {
&gt; -        if (isSuperUsedInInnerArrowFunction())
&gt; -            return true;
&gt; -    }
&gt; -    return false;
&gt; +    return m_codeBlock-&gt;isClassContext() &amp;&amp; isSuperUsedInInnerArrowFunction();</span >

I understand that m_codeBlock-&gt;isClassContext() means that &quot;executable-&gt;superBinding() == SuperBinding::Needed&quot;, and that in turn is true because we set &quot;expectedSuperBinding = m_defaultConstructorKind == ConstructorKind::Extends ? SuperBinding::Needed : SuperBinding::NotNeeded&quot;.  However, this relationship is a few steps removed.  Can you add an assert before this so that the relationship doesn't change without us noticing?
    ASSERT(m_codeBlock-&gt;isClassContext() || !(isConstructor() &amp;&amp; constructorKind() == ConstructorKind::Extends));</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>