[Webkit-unassigned] [Bug 166665] Super property access in base class constructor doesn't work
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 18 13:21:35 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=166665
Ryosuke Niwa <rniwa at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #299152|review? |review+
Flags| |
--- Comment #12 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 299152
--> https://bugs.webkit.org/attachment.cgi?id=299152
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=299152&action=review
> Source/JavaScriptCore/parser/Parser.cpp:1866
> + SuperBinding functionSuperBinding = superBindingForConstructor(constructorKind, superBinding, currentScope()->needsSuperBinding(), currentScope()->usesEval(), currentScope()->innerArrowFunctionFeatures());
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?
> Source/JavaScriptCore/parser/Parser.cpp:1885
> + SuperBinding functionSuperBinding = superBindingForConstructor(constructorKind, superBinding, currentScope()->needsSuperBinding(), currentScope()->usesEval(), currentScope()->innerArrowFunctionFeatures());
Why don't we add a function overload with takes the scope object instead of passing in three arguments here?
> Source/JavaScriptCore/parser/Parser.h:1605
> + ALWAYS_INLINE SuperBinding superBindingForConstructor(ConstructorKind constructorKind, SuperBinding superBinding, bool needsSuperBinding, bool currentScopeUsesEval, InnerArrowFunctionCodeFeatures innerArrowFunctionFeatures)
It's very confusing to have two variables named superBinding and needsSuperBinding.
I think the latter should be called scopeNeedsSuperBinding
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170118/0267d13a/attachment.html>
More information about the webkit-unassigned
mailing list