tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

instn-star-iee-cycle.js (2744B)


      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           i. Let namespace be ? GetModuleNamespace(importedModule).
     16           ii. Perform ! envRec.CreateImmutableBinding(in.[[LocalName]], true).
     17           iii. Call envRec.InitializeBinding(in.[[LocalName]], namespace).
     18        [...]
     19 
     20    15.2.1.16.3 ResolveExport( exportName, resolveSet, exportStarSet )
     21 
     22    2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do:
     23       a. If module and r.[[Module]] are the same Module Record and
     24          SameValue(exportName, r.[[ExportName]]) is true, then
     25          i. Assert: this is a circular import request.
     26          ii. Return null.
     27    3. Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet.
     28    [...]
     29    5. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
     30       a. If SameValue(exportName, e.[[ExportName]]) is true, then
     31          i. Assert: module imports a specific binding for this export.
     32          ii. Let importedModule be ? HostResolveImportedModule(module,
     33              e.[[ModuleRequest]]).
     34          iii. Let indirectResolution be ?
     35               importedModule.ResolveExport(e.[[ImportName]], resolveSet,
     36               exportStarSet).
     37          iv. If indirectResolution is not null, return indirectResolution.
     38 flags: [module]
     39 ---*/
     40 
     41 import * as ns from './instn-star-iee-cycle-2_FIXTURE.js';
     42 export { c as b } from './instn-star-iee-cycle-2_FIXTURE.js';
     43 export { e as d } from './instn-star-iee-cycle-2_FIXTURE.js';
     44 export { g as f } from './instn-star-iee-cycle-2_FIXTURE.js';
     45 export { i as h } from './instn-star-iee-cycle-2_FIXTURE.js';
     46 export { k as j } from './instn-star-iee-cycle-2_FIXTURE.js';
     47 export { m as l } from './instn-star-iee-cycle-2_FIXTURE.js';
     48 export { o as n } from './instn-star-iee-cycle-2_FIXTURE.js';
     49 export { q as p } from './instn-star-iee-cycle-2_FIXTURE.js';
     50 export { s as r } from './instn-star-iee-cycle-2_FIXTURE.js';
     51 export { u as t } from './instn-star-iee-cycle-2_FIXTURE.js';
     52 export { w as v } from './instn-star-iee-cycle-2_FIXTURE.js';
     53 export { y as x } from './instn-star-iee-cycle-2_FIXTURE.js';
     54 export var z = 23;
     55 
     56 assert.sameValue(ns.a, 23);
     57 
     58 reportCompare(0, 0);