<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:sbarati@apple.com" title="Saam Barati <sbarati@apple.com>"> <span class="fn">Saam Barati</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Arrow function syntax. Emit loading&putting this/super only if they are used in arrow function"
href="https://bugs.webkit.org/show_bug.cgi?id=153981">bug 153981</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 #271854 Flags</td>
<td>review?, commit-queue?
</td>
<td>review+, commit-queue-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Arrow function syntax. Emit loading&putting this/super only if they are used in arrow function"
href="https://bugs.webkit.org/show_bug.cgi?id=153981#c19">Comment # 19</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Arrow function syntax. Emit loading&putting this/super only if they are used in arrow function"
href="https://bugs.webkit.org/show_bug.cgi?id=153981">bug 153981</a>
from <span class="vcard"><a class="email" href="mailto:sbarati@apple.com" title="Saam Barati <sbarati@apple.com>"> <span class="fn">Saam Barati</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=271854&action=diff" name="attach_271854" title="Patch">attachment 271854</a> <a href="attachment.cgi?id=271854&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=271854&action=review">https://bugs.webkit.org/attachment.cgi?id=271854&action=review</a>
r=me w/ comments.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4050
> + return m_codeBlock->doAnyInnerArrowFunctionsUseNewTarget() || m_codeBlock->doAnyInnerArrowFunctionsUseSuperCall() || m_codeBlock->doAnyInnerArrowFunctionsUseEval();</span >
I was wrong about this. new.target is prohibited inside eval. Sorry for stating the wrong thing in my previous review.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4055
> + return m_codeBlock->doAnyInnerArrowFunctionsUseSuperCall() || m_codeBlock->doAnyInnerArrowFunctionsUseSuperProperty() || m_codeBlock->doAnyInnerArrowFunctionsUseEval() || m_codeBlock->usesEval();</span >
Also, 'super' isn't allowed inside an eval. It's a SyntaxError.
<span class="quote">> Source/JavaScriptCore/parser/Parser.h:473
> + if (m_isArrowFunction && m_usesEval)
> + setInnerArrowFunctionUseEval();
> +
> + if (m_isArrowFunction && m_vm->propertyNames->arguments == *ident)
> + setInnerArrowFunctionUseArgumetns();</span >
An alternative to doing this at every useVariable(.) call
is to just do it once when popScope happens.
<span class="quote">> Source/JavaScriptCore/parser/Parser.h:953
> + // We do not up arrow function features for ordinary function</span >
comment not needed.</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>