<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#c111">Comment # 111</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=258572&amp;action=diff" name="attach_258572" title="Patch">attachment 258572</a> <a href="attachment.cgi?id=258572&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt;&gt;&gt; Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:-4557
&gt;&gt;&gt; -&lt;/Project&gt;
&gt;&gt; 
&gt;&gt; Is this intended?
&gt; 
&gt; Is this intended?</span >

Reverted

<span class="quote">&gt;&gt;&gt; Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:729
&gt;&gt;&gt; +            return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode-&gt;source(), body, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, constructAbility, variablesUnderTDZ, nullptr);
&gt;&gt; 
&gt;&gt; Not: if nullptr is already the default parameter here you can revert this line.
&gt; 
&gt; Not: if nullptr is already the default parameter here you can revert this line.</span >

Done

<span class="quote">&gt;&gt;&gt; Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:852
&gt;&gt;&gt; +        case NewArrowFunction: {
&gt;&gt; 
&gt;&gt; Nit:
&gt;&gt; This code is mostly the same as the NewFunction case. 
&gt;&gt; I think it's better to have these cases be the same and then
&gt;&gt; have them differ where they need to based on op == NewArrowFunction. 
&gt;&gt; I know this is a bit pedantic it's better for future proofing code.
&gt; 
&gt; Nit:
&gt; This code is mostly the same as the NewFunction case. 
&gt; I think it's better to have these cases be the same and then
&gt; have them differ where they need to based on op == NewArrowFunction. 
&gt; I know this is a bit pedantic it's better for future proofing code.</span >

Refactored

<span class="quote">&gt;&gt;&gt; Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:1446
&gt;&gt;&gt; +        case Allocation::Kind::NewArrowFunction: {
&gt;&gt; 
&gt;&gt; Ditto here.
&gt; 
&gt; Ditto here.</span >

Done

<span class="quote">&gt;&gt;&gt; Source/JavaScriptCore/jit/JITOperations.cpp:945
&gt;&gt;&gt; +EncodedJSValue static operationNewArrowFunctionCommon(ExecState* exec, JSScope* scope, JSCell* functionExecutable, EncodedJSValue thisValue, bool isInvalidated)
&gt;&gt; 
&gt;&gt; Nit: call this operationNewFunctionCommon
&gt; 
&gt; Nit: call this operationNewFunctionCommon</span >

Renamed

<span class="quote">&gt;&gt;&gt; Source/JavaScriptCore/jit/JITOperations.cpp:947
&gt;&gt;&gt; +    UNUSED_PARAM(thisValue);
&gt;&gt; 
&gt;&gt; This seems wrong. You do use &quot;thisValue&quot;
&gt; 
&gt; This seems wrong. You do use &quot;thisValue&quot;</span >

Fixed

<span class="quote">&gt;&gt;&gt; Source/JavaScriptCore/parser/Nodes.h:1880
&gt;&gt;&gt; +    class ArrowFuncExprNode : public FuncExprNode {
&gt;&gt; 
&gt;&gt; I would either have his inherit from ExpressionNode or create a new
&gt;&gt; parent class that both FuncExprNode and ArrowFuncExprNode inherit from. 
&gt;&gt; This inheritance chain seems a bit weird.
&gt; 
&gt; I would either have his inherit from ExpressionNode or create a new
&gt; parent class that both FuncExprNode and ArrowFuncExprNode inherit from. 
&gt; This inheritance chain seems a bit weird.</span >

Done. Added new class BaseFuncExprNode</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>