instn-named-iee-cycle.js (2915B)
1 // |reftest| module 2 // Copyright (C) 2016 the V8 project authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 /*--- 5 description: > 6 There are no restrictions on the number of cycles during module traversal 7 during indirect export resolution, given unique export names. 8 esid: sec-moduledeclarationinstantiation 9 info: | 10 [...] 11 12. For each ImportEntry Record in in module.[[ImportEntries]], do 12 a. Let importedModule be ? HostResolveImportedModule(module, 13 in.[[ModuleRequest]]). 14 b. If in.[[ImportName]] is "*", then 15 [...] 16 c. Else, 17 i. Let resolution be ? 18 importedModule.ResolveExport(in.[[ImportName]], « », « »). 19 ii. If resolution is null or resolution is "ambiguous", throw a 20 SyntaxError exception. 21 iii. Call envRec.CreateImportBinding(in.[[LocalName]], 22 resolution.[[Module]], resolution.[[BindingName]]). 23 [...] 24 25 15.2.1.16.3 ResolveExport( exportName, resolveSet, exportStarSet ) 26 27 2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do: 28 a. If module and r.[[Module]] are the same Module Record and 29 SameValue(exportName, r.[[ExportName]]) is true, then 30 i. Assert: this is a circular import request. 31 ii. Return null. 32 3. Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet. 33 [...] 34 5. For each ExportEntry Record e in module.[[IndirectExportEntries]], do 35 a. If SameValue(exportName, e.[[ExportName]]) is true, then 36 i. Assert: module imports a specific binding for this export. 37 ii. Let importedModule be ? HostResolveImportedModule(module, 38 e.[[ModuleRequest]]). 39 iii. Let indirectResolution be ? 40 importedModule.ResolveExport(e.[[ImportName]], resolveSet, 41 exportStarSet). 42 iv. If indirectResolution is not null, return indirectResolution. 43 flags: [module] 44 ---*/ 45 46 import { a } from './instn-named-iee-cycle-2_FIXTURE.js'; 47 export { c as b } from './instn-named-iee-cycle-2_FIXTURE.js'; 48 export { e as d } from './instn-named-iee-cycle-2_FIXTURE.js'; 49 export { g as f } from './instn-named-iee-cycle-2_FIXTURE.js'; 50 export { i as h } from './instn-named-iee-cycle-2_FIXTURE.js'; 51 export { k as j } from './instn-named-iee-cycle-2_FIXTURE.js'; 52 export { m as l } from './instn-named-iee-cycle-2_FIXTURE.js'; 53 export { o as n } from './instn-named-iee-cycle-2_FIXTURE.js'; 54 export { q as p } from './instn-named-iee-cycle-2_FIXTURE.js'; 55 export { s as r } from './instn-named-iee-cycle-2_FIXTURE.js'; 56 export { u as t } from './instn-named-iee-cycle-2_FIXTURE.js'; 57 export { w as v } from './instn-named-iee-cycle-2_FIXTURE.js'; 58 export { y as x } from './instn-named-iee-cycle-2_FIXTURE.js'; 59 export var z = 23; 60 61 assert.sameValue(a, 23); 62 63 reportCompare(0, 0);