archives

« Bugzilla Issues Index

#3746 — Module Records need a realm property


Module Records need a [[Realm]] property to close over the realm they come from. This is used for constructing the lexical environment of the module, which affects evaluation of the module's top-level code as well as closures defined in the module.

In addition to adding the [[Realm]] property, the spec changes needed include:

- when parsing to construct a new Module Record, properly initialize the [[Realm]] property
- instantiation and evaluation of modules should consult the module record's [[Realm]] property
- when calling ModuleNamespaceCreate, use the [[Realm]] property of the module record

See https://gist.github.com/dherman/cad85565e0eb16d0a22d for details.

Dave


fixed in rev34 editor's draft


fixed in rev34