Setting this to null instead of throwing ReferenceError in a derived class' constructor
erik.arvidsson at gmail.com
Tue Jan 20 11:34:23 PST 2015
How is this different from other TDZ (which happens with let and const
On Tue Jan 20 2015 at 1:52:14 PM Ryosuke Niwa <rniwa at apple.com> wrote:
> Hi all,
> We've been working on an experimental implementation of ES6 class syntax
> in WebKit . And we've found that keeping "this" in uninitialized state
> inside a derived class's constructor is problematic. It introduces lots of
> branching around access to "this", which increases memory foot print and
> startup time. We can add a special optimizing compiler path to work to try
> to eliminate these branches but that would only make the startup problem
> worse and introduces undesirable complexities in our engine.
> Would it be possible to change it so that "this" is set to null until
> super() is called instead?
>  https://bugs.webkit.org/show_bug.cgi?id=140491
> - R. Niwa
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss