> From: Brendan Eich <bren...@mozilla.com> > Date: June 23, 2011 0:21:17 GMT+02:00 > >> Is there no per-call cost whatsoever to adding static super? > > No, it's static -- an internal property of the function object set once on > creation and (in my view) never changed thereafter unless unobservably > (Allen's point about optimizing Object.defineMethod when "handing off" an > otherwise-useless function expression).
How does a function get access to its properties? Doesn’t the ability to access "thisFunction" incur any costs? I would expect static super to work as follows: var Sub = Super <| { foo: function me(x) { me.super.foo.call(this, x); } } Does the named function expression cost nothing here? -- Dr. Axel Rauschmayer a...@rauschma.de twitter.com/rauschma home: rauschma.de blog: 2ality.com
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss