<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Implement ES6 arrow function syntax. Arrow function specific features. Lexical bind of this"
   href="https://bugs.webkit.org/show_bug.cgi?id=144956#c69">Comment # 69</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Implement ES6 arrow function syntax. Arrow function specific features. Lexical bind of this"
   href="https://bugs.webkit.org/show_bug.cgi?id=144956">bug 144956</a>
              from <span class="vcard"><a class="email" href="mailto:saambarati1&#64;gmail.com" title="Saam Barati &lt;saambarati1&#64;gmail.com&gt;"> <span class="fn">Saam Barati</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=257562&amp;action=diff" name="attach_257562" title="Patch">attachment 257562</a> <a href="attachment.cgi?id=257562&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:515
&gt; +        m_arrowFunctionThisRegister = addVar();</span >

This shouldn't be an addVar(). It should be a temporary.
Also, I'd put this &quot;if&quot; statement above the &quot;m_TDZStack.append(...)&quot; line.

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:2201
&gt; +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >

You don't need guars here.

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:304
&gt; +        RegisterID* arrowFunctionThisRegister() { return m_arrowFunctionThisRegister; }</span >

Don't need this.

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:481
&gt; +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >

You don't need guards here.

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:483
&gt; +        RegisterID* emitThisNodeBytecode(RegisterID*, JSTextPosition);</span >

This looks like it should be removed.

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:766
&gt; +        RegisterID* m_arrowFunctionThisRegister { nullptr };</span >

We don't need this to be a field.

<span class="quote">&gt; Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3070
&gt; +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)    </span >

Don't need guards here.

<span class="quote">&gt; Source/JavaScriptCore/parser/NodeConstructors.h:848
&gt; +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >

Don't need guards here.

<span class="quote">&gt; Source/JavaScriptCore/parser/Nodes.h:167
&gt; +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >

ditto.

<span class="quote">&gt; Source/JavaScriptCore/parser/Nodes.h:1742
&gt; +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >

ditto.

<span class="quote">&gt; Source/JavaScriptCore/runtime/CommonIdentifiers.h:187
&gt; +    macro(__private_arrowfunction_this__) \</span >

You probably want this under the &quot;JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME&quot; macro.
Also, there is no need to make this a crazy name with underscores. Just call it &quot;arrowFunctionBoundThis&quot; or something
similar. Also, make sure that this property is not visible to JS code.

<span class="quote">&gt; Source/JavaScriptCore/runtime/JSFunction.cpp:132
&gt; +void JSFunction::finishCreation(VM&amp; vm)</span >

Is this called?

<span class="quote">&gt; Source/JavaScriptCore/runtime/JSFunction.h:147
&gt;      using Base::finishCreation;</span >

Maybe we no longer want this line?</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>