<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:gskachkov&#64;gmail.com" title="GSkachkov &lt;gskachkov&#64;gmail.com&gt;"> <span class="fn">GSkachkov</span></a>
</span> changed
              <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>
        <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 #257562 is obsolete</td>
           <td>1
           </td>
           <td>
               &nbsp;
           </td>
         </tr></table>
      <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#c71">Comment # 71</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:gskachkov&#64;gmail.com" title="GSkachkov &lt;gskachkov&#64;gmail.com&gt;"> <span class="fn">GSkachkov</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;&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:515
&gt;&gt; +        m_arrowFunctionThisRegister = addVar();
&gt; 
&gt; This shouldn't be an addVar(). It should be a temporary.
&gt; Also, I'd put this &quot;if&quot; statement above the &quot;m_TDZStack.append(...)&quot; line.</span >

Done

<span class="quote">&gt;&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:2201
&gt;&gt; +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
&gt; 
&gt; You don't need guars here.</span >

Done

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

Done

<span class="quote">&gt;&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:481
&gt;&gt; +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
&gt; 
&gt; You don't need guards here.</span >

Done

<span class="quote">&gt;&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:483
&gt;&gt; +        RegisterID* emitThisNodeBytecode(RegisterID*, JSTextPosition);
&gt; 
&gt; This looks like it should be removed.</span >

Done

<span class="quote">&gt;&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:766
&gt;&gt; +        RegisterID* m_arrowFunctionThisRegister { nullptr };
&gt; 
&gt; We don't need this to be a field.</span >

Done

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

OK. I've removed. What is difference with ES6_CLASS_SYNTAX guards?

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

Done

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

Done

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

Done

<span class="quote">&gt;&gt; Source/JavaScriptCore/runtime/CommonIdentifiers.h:187
&gt;&gt; +    macro(__private_arrowfunction_this__) \
&gt; 
&gt; You probably want this under the &quot;JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME&quot; macro.
&gt; Also, there is no need to make this a crazy name with underscores. Just call it &quot;arrowFunctionBoundThis&quot; or something
&gt; similar. Also, make sure that this property is not visible to JS code.</span >

Done

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

Yes, it is called in createImpl function

<span class="quote">&gt;&gt; Source/JavaScriptCore/runtime/JSFunction.h:147
&gt;&gt;      using Base::finishCreation;
&gt; 
&gt; Maybe we no longer want this line?</span >

Done</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>