<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#c69">Comment # 69</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=257562&action=diff" name="attach_257562" title="Patch">attachment 257562</a> <a href="attachment.cgi?id=257562&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=257562&action=review">https://bugs.webkit.org/attachment.cgi?id=257562&action=review</a>
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:515
> + m_arrowFunctionThisRegister = addVar();</span >
This shouldn't be an addVar(). It should be a temporary.
Also, I'd put this "if" statement above the "m_TDZStack.append(...)" line.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:2201
> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >
You don't need guars here.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:304
> + RegisterID* arrowFunctionThisRegister() { return m_arrowFunctionThisRegister; }</span >
Don't need this.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:481
> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >
You don't need guards here.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:483
> + RegisterID* emitThisNodeBytecode(RegisterID*, JSTextPosition);</span >
This looks like it should be removed.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:766
> + RegisterID* m_arrowFunctionThisRegister { nullptr };</span >
We don't need this to be a field.
<span class="quote">> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3070
> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX) </span >
Don't need guards here.
<span class="quote">> Source/JavaScriptCore/parser/NodeConstructors.h:848
> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >
Don't need guards here.
<span class="quote">> Source/JavaScriptCore/parser/Nodes.h:167
> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >
ditto.
<span class="quote">> Source/JavaScriptCore/parser/Nodes.h:1742
> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)</span >
ditto.
<span class="quote">> Source/JavaScriptCore/runtime/CommonIdentifiers.h:187
> + macro(__private_arrowfunction_this__) \</span >
You probably want this under the "JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME" macro.
Also, there is no need to make this a crazy name with underscores. Just call it "arrowFunctionBoundThis" or something
similar. Also, make sure that this property is not visible to JS code.
<span class="quote">> Source/JavaScriptCore/runtime/JSFunction.cpp:132
> +void JSFunction::finishCreation(VM& vm)</span >
Is this called?
<span class="quote">> Source/JavaScriptCore/runtime/JSFunction.h:147
> using Base::finishCreation;</span >
Maybe we no longer want this line?</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>