<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:mark.lam@apple.com" title="Mark Lam <mark.lam@apple.com>"> <span class="fn">Mark Lam</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] Remove unnecessary condition from needsDerivedConstructorInArrowFunctionLexicalEnvironment in BytecodeGenerator.cpp"
href="https://bugs.webkit.org/show_bug.cgi?id=169832">bug 169832</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 #304865 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 - [JSC] Remove unnecessary condition from needsDerivedConstructorInArrowFunctionLexicalEnvironment in BytecodeGenerator.cpp"
href="https://bugs.webkit.org/show_bug.cgi?id=169832#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] Remove unnecessary condition from needsDerivedConstructorInArrowFunctionLexicalEnvironment in BytecodeGenerator.cpp"
href="https://bugs.webkit.org/show_bug.cgi?id=169832">bug 169832</a>
from <span class="vcard"><a class="email" href="mailto:mark.lam@apple.com" title="Mark Lam <mark.lam@apple.com>"> <span class="fn">Mark Lam</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=304865&action=diff" name="attach_304865" title="Patch">attachment 304865</a> <a href="attachment.cgi?id=304865&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=304865&action=review">https://bugs.webkit.org/attachment.cgi?id=304865&action=review</a>
<span class="quote">> Source/JavaScriptCore/ChangeLog:10
> + isConstructor.</span >
I think you mean "isClassContext" here.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1031
> - if ((isConstructor() && constructorKind() == ConstructorKind::Extends) || m_codeBlock->isClassContext()) {
> - if (isSuperUsedInInnerArrowFunction())
> - return true;
> - }
> - return false;
> + return m_codeBlock->isClassContext() && isSuperUsedInInnerArrowFunction();</span >
I understand that m_codeBlock->isClassContext() means that "executable->superBinding() == SuperBinding::Needed", and that in turn is true because we set "expectedSuperBinding = m_defaultConstructorKind == ConstructorKind::Extends ? SuperBinding::Needed : SuperBinding::NotNeeded". However, this relationship is a few steps removed. Can you add an assert before this so that the relationship doesn't change without us noticing?
ASSERT(m_codeBlock->isClassContext() || !(isConstructor() && constructorKind() == ConstructorKind::Extends));</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>