diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/tests/test262/language/module-code/instn-star-iee-cycle.js | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/language/module-code/instn-star-iee-cycle.js')
-rw-r--r-- | js/src/tests/test262/language/module-code/instn-star-iee-cycle.js | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/module-code/instn-star-iee-cycle.js b/js/src/tests/test262/language/module-code/instn-star-iee-cycle.js new file mode 100644 index 0000000000..3dbb85d9bd --- /dev/null +++ b/js/src/tests/test262/language/module-code/instn-star-iee-cycle.js @@ -0,0 +1,58 @@ +// |reftest| module +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + There are no restrictions on the number of cycles during module traversal + during indirect export resolution, given unique export names. +esid: sec-moduledeclarationinstantiation +info: | + [...] + 12. For each ImportEntry Record in in module.[[ImportEntries]], do + a. Let importedModule be ? HostResolveImportedModule(module, + in.[[ModuleRequest]]). + b. If in.[[ImportName]] is "*", then + i. Let namespace be ? GetModuleNamespace(importedModule). + ii. Perform ! envRec.CreateImmutableBinding(in.[[LocalName]], true). + iii. Call envRec.InitializeBinding(in.[[LocalName]], namespace). + [...] + + 15.2.1.16.3 ResolveExport( exportName, resolveSet, exportStarSet ) + + 2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do: + a. If module and r.[[Module]] are the same Module Record and + SameValue(exportName, r.[[ExportName]]) is true, then + i. Assert: this is a circular import request. + ii. Return null. + 3. Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet. + [...] + 5. For each ExportEntry Record e in module.[[IndirectExportEntries]], do + a. If SameValue(exportName, e.[[ExportName]]) is true, then + i. Assert: module imports a specific binding for this export. + ii. Let importedModule be ? HostResolveImportedModule(module, + e.[[ModuleRequest]]). + iii. Let indirectResolution be ? + importedModule.ResolveExport(e.[[ImportName]], resolveSet, + exportStarSet). + iv. If indirectResolution is not null, return indirectResolution. +flags: [module] +---*/ + +import * as ns from './instn-star-iee-cycle-2_FIXTURE.js'; +export { c as b } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { e as d } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { g as f } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { i as h } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { k as j } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { m as l } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { o as n } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { q as p } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { s as r } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { u as t } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { w as v } from './instn-star-iee-cycle-2_FIXTURE.js'; +export { y as x } from './instn-star-iee-cycle-2_FIXTURE.js'; +export var z = 23; + +assert.sameValue(ns.a, 23); + +reportCompare(0, 0); |