<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 #256242 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#c43">Comment # 43</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=256242&action=diff" name="attach_256242" title="Patch">attachment 256242</a> <a href="attachment.cgi?id=256242&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=256242&action=review">https://bugs.webkit.org/attachment.cgi?id=256242&action=review</a>
<span class="quote">>> Source/JavaScriptCore/ChangeLog:9
>> + In patch were implemented the following cases cases:
>
> "cases cases" => "cases"</span >
Done
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1809
>> +void BytecodeGenerator::emitNewFunctionAbstract(RegisterID* dst, FuncExprNode* func, OpcodeID opcodeID)
>
> Call this function "emitNewFunctionCommon"
> and also assert that opcodeID is what you expect.</span >
Done
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1817
>> instructions().append(index);
>
> I would append thisRegister conditionally here:
> if (opcodeID == op_new_arrow_func_exp)
> instruction().append(thisRegister()->index())</span >
Done
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1829
>> + emitTDZCheck(thisRegister());
>
> Do we need a TDZ check here? If so, why?</span >
See comment from Ryosuke Niwa <a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Implement ES6 arrow function syntax"
href="show_bug.cgi?id=140855#c66">https://bugs.webkit.org/show_bug.cgi?id=140855#c66</a>
Without this TDZ checks following test will fail LayoutTests/js/script-tests/arrowfunction-tdz.js
<span class="quote">>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1831
>> + instructions().append(thisRegister()->index());
>
> Above code change will let you remove this.</span >
Done
<span class="quote">>> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:4564
>> + ? m_jit.graph().globalObjectFor(node->origin.semantic)->arrowFunctionStructure()
>
> Indent four spaces (and to all below).</span >
Done
<span class="quote">>> Source/JavaScriptCore/jit/JITOpcodes.cpp:986
>> +void JIT::emit_op_new_abstract_func_exp(Instruction* currentInstruction, FunctionType functionType)
>
> Nit: I would camel case this and call it:
> emitNewFuncExprCommon.</span >
Done
<span class="quote">>> Source/JavaScriptCore/jit/JITOperations.cpp:1024
>> +EncodedJSValue JIT_OPERATION operationNewArrowFunctionWithInvalidatedReallocationWatchpoint(ExecState* exec, JSScope* scope, JSCell* functionExecutable, EncodedJSValue thisValue)
>
> Nit: This function and opeartionNewArrowFunction are nearly identical. There is probably an easy way
> to combine them.</span >
Done
<span class="quote">>> Source/JavaScriptCore/runtime/JSArrowFunction.cpp:99
>> + // Fixme: m_arrowFunction already removed by GC, because it created in before run JSArrowFunction::create method
>
> What's happening with this?</span >
Actually I don't know. When JSArrowFunction::visitChildren is invoked the thisObject->m_arrowFunction property is already empty so it lead to error. I susspect that this property is already deleted by GC.</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>