Skip to content

Commit fc64721

Browse files
Editorial: Lazily compute the list of [[Exports]] of a module namespace
A goal of the proposal is that implementations can, under some circumstances, easily implement lazy loading of deferred modules (when they know that they don't have syntax errors or transitive async dependencies). While trying to actually implement an example of that, I found a problem: even though it's not user-exposed, the spec eagerly reads the list of exports in GetModuleNamespace. It requires some non-trivial changes to actually do it lazily, and this PR does it directly in the spec so that implementations are not forced to diverge. Collection of the list of exports in a module (for the module namespace) is now centralized in GetModuleExportsList, including removal of the `"then"` key for deferred namespaces.
1 parent 167ae37 commit fc64721

File tree

2 files changed

+236
-200
lines changed

2 files changed

+236
-200
lines changed

0 commit comments

Comments
 (0)