<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:rniwa@webkit.org" title="Ryosuke Niwa <rniwa@webkit.org>"> <span class="fn">Ryosuke Niwa</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Super property access in base class constructor doesn't work"
href="https://bugs.webkit.org/show_bug.cgi?id=166665">bug 166665</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 #299152 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Super property access in base class constructor doesn't work"
href="https://bugs.webkit.org/show_bug.cgi?id=166665#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Super property access in base class constructor doesn't work"
href="https://bugs.webkit.org/show_bug.cgi?id=166665">bug 166665</a>
from <span class="vcard"><a class="email" href="mailto:rniwa@webkit.org" title="Ryosuke Niwa <rniwa@webkit.org>"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=299152&action=diff" name="attach_299152" title="Patch">attachment 299152</a> <a href="attachment.cgi?id=299152&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=299152&action=review">https://bugs.webkit.org/attachment.cgi?id=299152&action=review</a>
<span class="quote">> Source/JavaScriptCore/parser/Parser.cpp:1866
> + SuperBinding functionSuperBinding = superBindingForConstructor(constructorKind, superBinding, currentScope()->needsSuperBinding(), currentScope()->usesEval(), currentScope()->innerArrowFunctionFeatures());</span >
I think it's confusing to call superBindingForConstructor to compute functionSuperBinding given a function is not always a constructor.
Why don't we call this function something like adjustSuperBindingForBaseConstructor?
<span class="quote">> Source/JavaScriptCore/parser/Parser.cpp:1885
> + SuperBinding functionSuperBinding = superBindingForConstructor(constructorKind, superBinding, currentScope()->needsSuperBinding(), currentScope()->usesEval(), currentScope()->innerArrowFunctionFeatures());</span >
Why don't we add a function overload with takes the scope object instead of passing in three arguments here?
<span class="quote">> Source/JavaScriptCore/parser/Parser.h:1605
> + ALWAYS_INLINE SuperBinding superBindingForConstructor(ConstructorKind constructorKind, SuperBinding superBinding, bool needsSuperBinding, bool currentScopeUsesEval, InnerArrowFunctionCodeFeatures innerArrowFunctionFeatures)</span >
It's very confusing to have two variables named superBinding and needsSuperBinding.
I think the latter should be called scopeNeedsSuperBinding</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>