Standard modules?

Kevin Reid kpreid at
Mon Jan 20 14:16:57 PST 2014

On Sun, Jan 19, 2014 at 7:21 PM, Allen Wirfs-Brock <allen at>wrote:

> It isn't clear that there much need for a global name for
> GeneratorFunction.  If you really eed to access it can always get it via:
>    (function *() {}).constructor
> (as the always helful generator UMO diagram at
> tells
> us)

SES needs to visit every 'primordial' / 'singleton' object to ensure
they're made immutable and harmless. (Other 'meta' code might also benefit
though I don't know of any examples offhand.)

This job is easier if all such objects are reachable via traversing data

ES5 contains only one object which this is not true of: [[ThrowTypeError]].
This would have been fine since [[ThrowTypeError]] as specified is
immutable and harmless, but in practice many implementations have bugs or
extensions which make it mutable. We had to add a special case for it to
ensure that it was traversed.

It would be nice if there was some way in ES6 to make sure SES doesn't miss
any objects — either that every primordial object is reachable via data
properties (more precisely: that there are no preexisting objects which are
reachable only by way of executing some program construct; e.g. Array is
reachable by [].constructor, but is also named Array in the standard
environment), or there is some other way to enumerate them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list