[Webkit-unassigned] [Bug 144956] [ES6] Implement ES6 arrow function syntax. Arrow function specific features. Lexical bind of this

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 30 15:41:09 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=144956

--- Comment #79 from Saam Barati <saambarati1 at gmail.com> ---
Comment on attachment 257762
  --> https://bugs.webkit.org/attachment.cgi?id=257762
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=257762&action=review

> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:953
> +            fixEdge<FinalObjectUse>(node->child1());

This should probably be:
fixEdge<KnownCellUse>(node->child1())

> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:954
> +            node->convertToIdentity();

This seems wrong. This should be removed.

> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:1275
> +            m_insertionSet.insertNode(m_indexInBlock, SpecNone, Check, node->origin,

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

> Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:843
> +        case NewArrowFunction: 

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.

> Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:988
> +            if (target && target->isFunctionAllocation())

isFunctionAllocation() should return true for NewArrowFunction.

> Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:990
> +            else

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

> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:4599
> +void SpeculativeJIT::compileNewFunction(Node* node, NodeType nodeType)

You don't need NodeType as a parameter to this function. Node will have that information.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150730/89b5a1e7/attachment-0001.html>


More information about the webkit-unassigned mailing list