Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSuperfluous check in [[Get]] for Module Namespace Exotic Object? #602
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
allenwb
Jun 7, 2016
Member
The spec. allows an implementation to extend the language with additional kinds of modules. 15.2.1.16.4 only applies to Source Text Modules. 9.4.6.8 must work will all kinds of modules, including implementation provided kinds. Step 11 is there just in case the environment of such an extension module has not been set.
|
The spec. allows an implementation to extend the language with additional kinds of modules. 15.2.1.16.4 only applies to Source Text Modules. 9.4.6.8 must work will all kinds of modules, including implementation provided kinds. Step 11 is there just in case the environment of such an extension module has not been set. |
GeorgNeis commentedJun 7, 2016
In 9.4.6.8, step 11 throws an exception if the module's environment is undefined. How can this ever happen? The environment is set in 15.2.1.16.4 ModuleDeclarationInstantiation and never unset as far as I can tell. I don't see how a namespace object's [[Get]] can be invoked without ModuleDeclarationInstantiation having happened before.