<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Invoking super()/super inside of the eval should not lead to SyntaxError"
   href="https://bugs.webkit.org/show_bug.cgi?id=153864#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Invoking super()/super inside of the eval should not lead to SyntaxError"
   href="https://bugs.webkit.org/show_bug.cgi?id=153864">bug 153864</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=273142&amp;action=diff" name="attach_273142" title="Patch">attachment 273142</a> <a href="attachment.cgi?id=273142&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:307
&gt; +            return !(m_codeBlock-&gt;isArrowFunction() || m_codeType == EvalCode) || m_isNewTargetLoadedInArrowFunction
&gt;                  ? m_newTargetRegister : emitLoadNewTargetFromArrowFunctionLexicalEnvironment();</span >

This function is getting hard to read. I vote for an if statement here.
Also, I found a bug in the logic of caching here:
<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - How we load new.target in arrow functions is broken"
   href="show_bug.cgi?id=155153">https://bugs.webkit.org/show_bug.cgi?id=155153</a>

<span class="quote">&gt; Source/JavaScriptCore/parser/Parser.cpp:2068
&gt; +            ConstructorKind functionConstructorKind = functionBodyType == StandardFunctionBodyBlock &amp;&amp; !m_isEvalContext</span >

Don't we already know if we're parsing an eval?
Why do we need m_isEvalContext?
Maybe I'm mistaken.

<span class="quote">&gt; Source/JavaScriptCore/parser/Parser.cpp:3820
&gt; +        semanticFailIfFalse(currentScope()-&gt;isFunction() || (m_isEvalContext &amp;&amp; closestParentOrdinaryFunctionNonLexicalScope()-&gt;expectedSuperBinding() == SuperBinding::Needed), &quot;super is only valid inside functions&quot;);</span >

This error message should be updated.

<span class="quote">&gt; Source/JavaScriptCore/runtime/CodeCache.cpp:104
&gt; +    bool isEvalConext = true;</span >

This is definitely not true. This should probably be a parameter to this function.

<span class="quote">&gt; Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-superproperty.js:232
&gt; +class K extends A {</span >

let's have some eval tests inside a constructor.
tests for TDZ, etc.</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>