<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#c108">Comment # 108</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@gmail.com" title="Saam Barati <saambarati1@gmail.com>"> <span class="fn">Saam Barati</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=258572&action=diff" name="attach_258572" title="Patch">attachment 258572</a> <a href="attachment.cgi?id=258572&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=258572&action=review">https://bugs.webkit.org/attachment.cgi?id=258572&action=review</a>
Patch looks good to me. I'll ask pizlo to take a look as well.
<span class="quote">> Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:-4557
> -</Project></span >
Is this intended?
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:729
> + return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode->source(), body, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, constructAbility, variablesUnderTDZ, nullptr);</span >
Not: if nullptr is already the default parameter here you can revert this line.
<span class="quote">> Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:852
> + case NewArrowFunction: {</span >
Nit:
This code is mostly the same as the NewFunction case.
I think it's better to have these cases be the same and then
have them differ where they need to based on op == NewArrowFunction.
I know this is a bit pedantic it's better for future proofing code.
<span class="quote">> Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:1446
> + case Allocation::Kind::NewArrowFunction: {</span >
Ditto here.
<span class="quote">> Source/JavaScriptCore/jit/JITOperations.cpp:945
> +EncodedJSValue static operationNewArrowFunctionCommon(ExecState* exec, JSScope* scope, JSCell* functionExecutable, EncodedJSValue thisValue, bool isInvalidated)</span >
Nit: call this operationNewFunctionCommon
<span class="quote">> Source/JavaScriptCore/jit/JITOperations.cpp:947
> + UNUSED_PARAM(thisValue);</span >
This seems wrong. You do use "thisValue"
<span class="quote">> Source/JavaScriptCore/parser/Nodes.h:1880
> + class ArrowFuncExprNode : public FuncExprNode {</span >
I would either have his inherit from ExpressionNode or create a new
parent class that both FuncExprNode and ArrowFuncExprNode inherit from.
This inheritance chain seems a bit weird.</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>