<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Arrow function. Some not used byte code is emited"
href="https://bugs.webkit.org/show_bug.cgi?id=154639">154639</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ES6] Arrow function. Some not used byte code is emited
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>JavaScriptCore
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>gskachkov@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>During checking arrow function I found that some unused byte code is emited:
for instance for:
var f2 = function () { return ()=>'test';};
f2()();
was generated:
....
f2#DrpDJu:[0x10de8f840->0x10de76f40, NoneFunctionCall, 20]: 20 m_instructions; 160 bytes; 1 parameter(s); 8 callee register(s); 7 variable(s)
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] create_lexical_environment loc5, loc3, Cell: 0x10de3bdd0 (0x10de27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20(const0), Undefined(const1) // Not used create_lexical_environment byte code
[ 11] mov loc3, loc5
[ 14] op_new_arrow_func_exp loc7, loc3, f0
[ 18] ret loc7
Constants:
k0 = Cell: 0x10de3bdd0 (0x10de27600:[SymbolTable, {}, NonArray, Leaf]), ID: 20
k1 = Undefined
#An0cos:[0x10de8f620->0x10de76e00, NoneFunctionCall, 10]: 10 m_instructions; 80 bytes; 1 parameter(s); 8 callee register(s); 6 variable(s)
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] ret String (atomic) (identifier): test, ID: 4(const1)
[ 8] ret Undefined(const2) // Not used byte code</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>