<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<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#c8">Comment # 8</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=299045&action=diff" name="attach_299045" title="Patch">attachment 299045</a> <a href="attachment.cgi?id=299045&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=299045&action=review">https://bugs.webkit.org/attachment.cgi?id=299045&action=review</a>
<span class="quote">> Source/JavaScriptCore/ChangeLog:8
> + Current patch fixed allow to use super inside of the constructor for classes </span >
Nit: "Current patch fixed allow" -> "Allow".
You should also explain how you're fixing the problem.
<span class="quote">> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3696
> + } else if (metadata->superBinding() == SuperBinding::Needed)
> + superIsUsedInConstructor = true;</span >
Why don't we just create a new boolean like "needsHomeObject" and set it to true whenever this is true or m_classHeritage is set?
<span class="quote">> Source/JavaScriptCore/parser/Parser.h:1605
> + ALWAYS_INLINE SuperBinding getSuperBindingForConstructor(ConstructorKind constructorKind, SuperBinding superBinding, bool needsSuperBinding, bool currentScopeUsesEval, InnerArrowFunctionCodeFeatures innerArrowFunctionFeatures)</span >
Nit: we don't prefix a getter function with "get" unless there is an out argument.
See <a href="https://webkit.org/code-style-guidelines/#names-setter-getter">https://webkit.org/code-style-guidelines/#names-setter-getter</a>
<span class="quote">> Source/JavaScriptCore/parser/Parser.h:1612
> + methodSuperBinding = (needsSuperBinding || isSuperUsedInInnerArrowFunction || isEvalUsedInInnerArrowFunctions || currentScopeUsesEval) ? SuperBinding::Needed : SuperBinding::NotNeeded;</span >
Why do we need super binding when eval is used inside an arrow function?
I don't see any test case of that either.</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>