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

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

<span class="quote">&gt; Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:953
&gt; +            fixEdge&lt;FinalObjectUse&gt;(node-&gt;child1());</span >

This should probably be:
fixEdge&lt;KnownCellUse&gt;(node-&gt;child1())

<span class="quote">&gt; Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:954
&gt; +            node-&gt;convertToIdentity();</span >

This seems wrong. This should be removed.

<span class="quote">&gt; Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:1275
&gt; +            m_insertionSet.insertNode(m_indexInBlock, SpecNone, Check, node-&gt;origin,</span >

What is this doing?
I think it should be removed.

<span class="quote">&gt; Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:843
&gt; +        case NewArrowFunction: </span >

Lets focus on getting this properly working in the DFG before spending time getting the allocation sinking phase right.
Allocation sinking is only run when we compile into the FTL. That said, some basic comments below:

We will need to change this a bit to incorporate the bound this of the arrow function.
Look below at FunctionActivationPLoc/FunctionExecutablePLoc. Maybe you would
create a FunctionBoundThisPLoc.

<span class="quote">&gt; Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:988
&gt; +            if (target &amp;&amp; target-&gt;isFunctionAllocation())</span >

isFunctionAllocation() should return true for NewArrowFunction.

<span class="quote">&gt; Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:990
&gt; +            else</span >

Why would this ever not be a function? That seems like it'd be wrong.

<span class="quote">&gt; Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:4599
&gt; +void SpeculativeJIT::compileNewFunction(Node* node, NodeType nodeType)</span >

You don't need NodeType as a parameter to this function. Node will have that information.</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>