<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:gskachkov@gmail.com" title="GSkachkov <gskachkov@gmail.com>"> <span class="fn">GSkachkov</span></a>
</span> changed
<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>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #257562 is obsolete</td>
<td>1
</td>
<td>
</td>
</tr></table>
<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#c71">Comment # 71</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@gmail.com" title="GSkachkov <gskachkov@gmail.com>"> <span class="fn">GSkachkov</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();
>
> 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 >
Done
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:2201
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> You don't need guars here.</span >
Done
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:304
>> + RegisterID* arrowFunctionThisRegister() { return m_arrowFunctionThisRegister; }
>
> Don't need this.</span >
Done
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:481
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> You don't need guards here.</span >
Done
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:483
>> + RegisterID* emitThisNodeBytecode(RegisterID*, JSTextPosition);
>
> This looks like it should be removed.</span >
Done
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:766
>> + RegisterID* m_arrowFunctionThisRegister { nullptr };
>
> We don't need this to be a field.</span >
Done
<span class="quote">>> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3070
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> Don't need guards here.</span >
OK. I've removed. What is difference with ES6_CLASS_SYNTAX guards?
<span class="quote">>> Source/JavaScriptCore/parser/NodeConstructors.h:848
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> Don't need guards here.</span >
Done
<span class="quote">>> Source/JavaScriptCore/parser/Nodes.h:167
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> ditto.</span >
Done
<span class="quote">>> Source/JavaScriptCore/parser/Nodes.h:1742
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> ditto.</span >
Done
<span class="quote">>> Source/JavaScriptCore/runtime/CommonIdentifiers.h:187
>> + macro(__private_arrowfunction_this__) \
>
> 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 >
Done
<span class="quote">>> Source/JavaScriptCore/runtime/JSFunction.cpp:132
>> +void JSFunction::finishCreation(VM& vm)
>
> Is this called?</span >
Yes, it is called in createImpl function
<span class="quote">>> Source/JavaScriptCore/runtime/JSFunction.h:147
>> using Base::finishCreation;
>
> Maybe we no longer want this line?</span >
Done</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>