third_party/es6-module-loader/loader.js
function finishLoad(loader, load) {
      // add to global trace if tracing
      if (loader.loaderObj.trace) {
        if (!loader.loaderObj.loads)
          loader.loaderObj.loads = {};
        var depMap = {};
        load.dependencies.forEach(function(dep) {
          depMap[dep.key] = dep.value;
        });
        loader.loaderObj.loads[load.name] = {
          name: load.name,
          deps: load.dependencies.map(function(dep){ return dep.key }),
          depMap: depMap,
          address: load.address,
          metadata: load.metadata,
          source: load.source,
          kind: load.kind
        };
      }
      // if not anonymous, add to the module table
      if (load.name) {
        console.assert(!loader.modules[load.name], 'load not in module table');
        loader.modules[load.name] = load.module;
      }
      var loadIndex = indexOf.call(loader.loads, load);
      if (loadIndex != -1)
        loader.loads.splice(loadIndex, 1);
      for (var i = 0, l = load.linkSets.length; i < l; i++) {
        loadIndex = indexOf.call(load.linkSets[i].loads, load);
        if (loadIndex != -1)
          load.linkSets[i].loads.splice(loadIndex, 1);
      }
      load.linkSets.splice(0, load.linkSets.length);
    }
function finishLoad(loader, load) {
      // add to global trace if tracing
      if (loader.loaderObj.trace) {
        if (!loader.loaderObj.loads)
          loader.loaderObj.loads = {};
        var depMap = {};
        load.dependencies.forEach(function(dep) {
          depMap[dep.key] = dep.value;
        });
        loader.loaderObj.loads[load.name] = {
          name: load.name,
          deps: load.dependencies.map(function(dep){ return dep.key }),
          depMap: depMap,
          address: load.address,
          metadata: load.metadata,
          source: load.source,
          kind: load.kind
        };
      }
      // if not anonymous, add to the module table
      if (load.name) {
        console.assert(!loader.modules[load.name], 'load not in module table');
        loader.modules[load.name] = load.module;
      }
      var loadIndex = indexOf.call(loader.loads, load);
      if (loadIndex != -1)
        loader.loads.splice(loadIndex, 1);
      for (var i = 0, l = load.linkSets.length; i < l; i++) {
        loadIndex = indexOf.call(load.linkSets[i].loads, load);
        if (loadIndex != -1)
          load.linkSets[i].loads.splice(loadIndex, 1);
      }
      load.linkSets.splice(0, load.linkSets.length);
    }
function finishLoad ( loader , load ) { // add to global trace if tracing if ( loader . loaderObj . trace ) { if ( ! loader . loaderObj . loads ) loader . loaderObj . loads = { } ; var depMap = { } ; load . dependencies . forEach ( function ( dep ) { depMap [ dep . key ] = dep . value ; } ) ; loader . loaderObj . loads [ load . name ] = { name : load . name , deps : load . dependencies . map ( function ( dep ) { return dep . key } ) , depMap : depMap , address : load . address , metadata : load . metadata , source : load . source , kind : load . kind } ; } // if not anonymous, add to the module table if ( load . name ) { console . assert ( ! loader . modules [ load . name ] , 'load not in module table' ) ; loader . modules [ load . name ] = load . module ; } var loadIndex = indexOf . call ( loader . loads , load ) ; if ( loadIndex != - 1 ) loader . loads . splice ( loadIndex , 1 ) ; for ( var i = 0 , l = load . linkSets . length ; i < l ; i ++ ) { loadIndex = indexOf . call ( load . linkSets [ i ] . loads , load ) ; if ( loadIndex != - 1 ) load . linkSets [ i ] . loads . splice ( loadIndex , 1 ) ; } load . linkSets . splice ( 0 , load . linkSets . length ) ; }
15.2.5.2.5
15 . 2 . 5 . 2 . 5