<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#c10">Comment # 10</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:gskachkov@gmail.com" title="GSkachkov <gskachkov@gmail.com>"> <span class="fn">GSkachkov</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=166665#c8">comment #8</a>)
<span class="quote">> Comment on <span class="bz_obsolete"><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>
>
> > Source/JavaScriptCore/ChangeLog:8
> > + Current patch fixed allow to use super inside of the constructor for classes
>
> Nit: "Current patch fixed allow" -> "Allow".
>
> You should also explain how you're fixing the problem.
>
> > Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3696
> > + } else if (metadata->superBinding() == SuperBinding::Needed)
> > + superIsUsedInConstructor = true;
>
> 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?
>
> > Source/JavaScriptCore/parser/Parser.h:1605
> > + ALWAYS_INLINE SuperBinding getSuperBindingForConstructor(ConstructorKind constructorKind, SuperBinding superBinding, bool needsSuperBinding, bool currentScopeUsesEval, InnerArrowFunctionCodeFeatures innerArrowFunctionFeatures)
>
> 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>
>
> > Source/JavaScriptCore/parser/Parser.h:1612
> > + methodSuperBinding = (needsSuperBinding || isSuperUsedInInnerArrowFunction || isEvalUsedInInnerArrowFunctions || currentScopeUsesEval) ? SuperBinding::Needed : SuperBinding::NotNeeded;
>
> Why do we need super binding when eval is used inside an arrow function?
> I don't see any test case of that either.</span >
I've tried to explicitly cover case when eval in arrow function so there can be used super, but currentScopeUsesEval should cover this case.</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>