code: function (modNames, cache, ret) {
              var i,
                  m,
                  mod,
                  modStatus,
                  self = this,
                  waitingModules = self.waitingModules;
  
              ret = ret || {};
              // 提高性能，不用每个模块都再次全部依赖计算
              // 做个缓存，每个模块对应的待动态加载模块
              cache = cache || {};
  
              for (i = 0; i < modNames.length; i++) {
                  m = modNames[i];
                  if (cache[m]) {
                      continue;
                  }
                  cache[m] = 1;
                  mod = Utils.createModuleInfo(m);
                  modStatus = mod.status;
                  if (modStatus >= READY_TO_ATTACH) {
                      continue;
                  }
                  if (modStatus !== LOADED) {
                      if (!waitingModules.contains(m)) {
                          if (modStatus !== LOADING) {
                              mod.status = LOADING;
                              ret[m] = 1;
                          }
                          /*jshint loopfunc:true*/
                          mod.wait(function (mod) {
                              waitingModules.remove(mod.name);
                              // notify current loader instance
                              waitingModules.notifyAll();
                          });
                          waitingModules.add(m);
                      }
                  }
                  self.calculate(mod.getNormalizedRequires(), cache, ret);
              }
  
              return ret;
          }
docs: calculate dependency