ES6 classes: deferring the creation step

Kevin Smith zenparsing at
Sat Jun 28 19:46:41 PDT 2014

Thanks Claude for working this up.

> InitializeThisBindings(nonconstructedObj, obj) abstract operation
> ----------------------------------------------------------------------
> This operation performs the actual initialisation of the this-bindings
> that were previously deferred:
>    1. Assert `nonconstructedThisObj` is a Non-Constructed Object.
>    2. Assert `obj` is an ordinary object.
>    3. Replace all references to `nonconstructedThisObj` with references to
> `obj`.
>      (In particular, this step will effectively initialise the
> this-binding of every function environment record that used to reference
> `nonconstructedObj`.)

I was vaguely thinking along similar lines last week, but was stumped at
this point.  Is step #3 possible?  You'd basically have to (magically?)
replace the "this" binding for any subclass constructors on the call stack.
 This is probably a question for Allen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list