third_party/es6-module-loader/loader.js
function addLoadToLinkSet(linkSet, load) {
      console.assert(load.status == 'loading' || load.status == 'loaded', 'loading or loaded on link set');

      for (var i = 0, l = linkSet.loads.length; i < l; i++)
        if (linkSet.loads[i] == load)
          return;

      linkSet.loads.push(load);
      load.linkSets.push(linkSet);

      // adjustment, see https://bugs.ecmascript.org/show_bug.cgi?id=2603
      if (load.status != 'loaded') {
        linkSet.loadingCount++;
      }

      var loader = linkSet.loader;

      for (var i = 0, l = load.dependencies.length; i < l; i++) {
        var name = load.dependencies[i].value;

        if (loader.modules[name])
          continue;

        for (var j = 0, d = loader.loads.length; j < d; j++) {
          if (loader.loads[j].name != name)
            continue;

          addLoadToLinkSet(linkSet, loader.loads[j]);
          break;
        }
      }
      // console.log('add to linkset ' + load.name);
      // snapshot(linkSet.loader);
    }
function addLoadToLinkSet(linkSet, load) {
      console.assert(load.status == 'loading' || load.status == 'loaded', 'loading or loaded on link set');

      for (var i = 0, l = linkSet.loads.length; i < l; i++)
        if (linkSet.loads[i] == load)
          return;

      linkSet.loads.push(load);
      load.linkSets.push(linkSet);

      // adjustment, see https://bugs.ecmascript.org/show_bug.cgi?id=2603
      if (load.status != 'loaded') {
        linkSet.loadingCount++;
      }

      var loader = linkSet.loader;

      for (var i = 0, l = load.dependencies.length; i < l; i++) {
        var name = load.dependencies[i].value;

        if (loader.modules[name])
          continue;

        for (var j = 0, d = loader.loads.length; j < d; j++) {
          if (loader.loads[j].name != name)
            continue;

          addLoadToLinkSet(linkSet, loader.loads[j]);
          break;
        }
      }
      // console.log('add to linkset ' + load.name);
      // snapshot(linkSet.loader);
    }
function addLoadToLinkSet ( linkSet , load ) { console . assert ( load . status == 'loading' || load . status == 'loaded' , 'loading or loaded on link set' ) ; for ( var i = 0 , l = linkSet . loads . length ; i < l ; i ++ ) if ( linkSet . loads [ i ] == load ) return ; linkSet . loads . push ( load ) ; load . linkSets . push ( linkSet ) ; // adjustment, see https://bugs.ecmascript.org/show_bug.cgi?id=2603 if ( load . status != 'loaded' ) { linkSet . loadingCount ++ ; } var loader = linkSet . loader ; for ( var i = 0 , l = load . dependencies . length ; i < l ; i ++ ) { var name = load . dependencies [ i ] . value ; if ( loader . modules [ name ] ) continue ; for ( var j = 0 , d = loader . loads . length ; j < d ; j ++ ) { if ( loader . loads [ j ] . name != name ) continue ; addLoadToLinkSet ( linkSet , loader . loads [ j ] ) ; break ; } } // console.log('add to linkset ' + load.name); // snapshot(linkSet.loader); }
15.2.5.2.2
15 . 2 . 5 . 2 . 2