1.1.1Source Text Module Recordslinkpin
  1.1.1.1GetExportedNames( exportStarSet ) Concrete Methodlinkpin
  Note 1This is  Section 15.2.1.16.2 in the current spec.
  The GetExportedNames concrete method of a Source Text Module Record with argument exportStarSet performs the following steps:
  - Let module be this Source Text Module Record.
 - If exportStarSet contains module, then
- Assert: We've reached the starting point of an 
import * circularity. - Return a new empty List.
 
 - Append module to exportStarSet.
 - Let exportedNames be a new empty List.
 - For each ExportEntry Record e in module.[[LocalExportEntries]], do
- Assert: module provides the direct binding for this export.
 - Append e.[[ExportName]] to exportedNames.
 
 - For each ExportEntry Record e in module.[[IndirectExportEntries]], do
- Assert: module imports a specific binding for this export.
 - Append e.[[ExportName]] to exportedNames.
 
 - For each ExportEntry Record e in module.[[StarExportEntries]], do
- Let requestedModule be ? HostResolveImportedModule(module, e.[[ModuleRequest]]).
 - Let starNames be ? requestedModule.GetExportedNames(exportStarSet).
 - For each element n of starNames, do
If SameValue(n, "default") is false, then- If n is not an element of exportedNames, then
- Append n to exportedNames.
 
 
 
 - Return exportedNames.
  
 
  Note 2
    GetExportedNames does not filter out or throw an exception for names that have ambiguous star export bindings.
  
  1.1.1.2ResolveExport( exportName, resolveSet, exportStarSet ) Concrete Methodlinkpin
  Note 1This is  Section 15.2.1.16.3 in the current spec.
  The ResolveExport concrete method of a Source Text Module Record with arguments exportName, resolveSet, and exportStarSet performs the following steps:
  - Let module be this Source Text Module Record.
 - For each Record {[[Module]], [[ExportName]]} r in resolveSet, do:
- If module and r.[[Module]] are the same Module Record and SameValue(exportName, r.[[ExportName]]) is true, then
- Assert: This is a circular import request.
 - Return null.
 
 
 - Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet.
 - For each ExportEntry Record e in module.[[LocalExportEntries]], do
- If SameValue(exportName, e.[[ExportName]]) is true, then
- Assert: module provides the direct binding for this export.
 - Return Record{[[Module]]: module, [[BindingName]]: e.[[LocalName]]}.
 
 
 - For each ExportEntry Record e in module.[[IndirectExportEntries]], do
- If SameValue(exportName, e.[[ExportName]]) is true, then
- Assert: module imports a specific binding for this export.
 - Let importedModule be ? HostResolveImportedModule(module, e.[[ModuleRequest]]).
 - Return ? importedModule.ResolveExport(e.[[ImportName]], resolveSet, exportStarSet).
 
 
 If SameValue(exportName, "default") is true, thenAssert: A default export was not explicitly defined by this module.Return null.NOTE A default export cannot be provided by an export *.
- If exportStarSet contains module, return null.
 - Append module to exportStarSet.
 - Let starResolution be null.
 - For each ExportEntry Record e in module.[[StarExportEntries]], do
- Let importedModule be ? HostResolveImportedModule(module, e.[[ModuleRequest]]).
 - Let resolution be ? importedModule.ResolveExport(exportName, resolveSet, exportStarSet).
 - If resolution is 
"ambiguous", return "ambiguous". - If resolution is not null, then
- If starResolution is null, let starResolution be resolution.
 - Else,
- Assert: There is more than one 
* import that includes the requested name. - If resolution.[[Module]] and starResolution.[[Module]] are not the same Module Record or SameValue(resolution.[[BindingName]], starResolution.[[BindingName]]) is false, return 
"ambiguous". 
 
 
 - Return starResolution.
  
 
  Note 2
    ResolveExport attempts to resolve an imported binding to the actual defining module and local binding name. The defining module may be the module represented by the Module Record this method was invoked on or some other module that is imported by that module. The parameter resolveSet is use to detect unresolved circular import/export paths. If a pair consisting of specific Module Record and exportName is reached that is already in resolveSet, an import circularity has been encountered. Before recursively calling ResolveExport, a pair consisting of module and exportName is added to resolveSet.
    If a defining module is found a Record {[[Module]], [[BindingName]]} is returned. This record identifies the resolved binding of the originally requested export. If no definition was found or the request is found to be circular, null is returned. If the request is found to be ambiguous, the string "ambiguous" is returned.