Making "super" work outside a literal?
brendan at mozilla.com
Wed Jun 22 15:21:46 PDT 2011
On Jun 22, 2011, at 2:37 PM, Sean Eagan wrote:
> On Wed, Jun 22, 2011 at 2:11 PM, Brendan Eich <brendan at mozilla.com> wrote:
>> On Jun 22, 2011, at 11:01 AM, Sean Eagan wrote:
>>> On Wed, Jun 22, 2011 at 12:07 PM, Juan Ignacio Dopazo
>>> <dopazo.juan at gmail.com> wrote:
>>>> Can the value of a dynamic super be unambiguously resolved with prototype
>>>> climbing and without an extra implicit parameter?
>>> Yes, it can be unambiguously determined by prototype climbing, the
>>> only information from the call site that is used is the base ( |this|
>>> ) value of the method call or accessor property access, whose
>>> prototype chain is the one that is climbed.
>> I hope you aren't proposing lazy re-climbing on the first or all evaluations of 'super'. That will not work. The actual 'here' or "method home" found during callee evaluation must be used. You cannot assume prototype lookup is idempotent.
> Correct, no new prototype climbing that doesn't already occur.
Then that means an extra implicit parameter beyond |this| for every call site.
More information about the es-discuss