third_party/closure_compiler/js_binary.py
def CrawlDepsTree(deps):
  """Parses the dependency tree creating a post-order listing of sources."""
  global depcache

  if len(deps) == 0:
    return ([], [])

  new_sources = []
  new_externs = []
  for dep in deps:
    if dep in depcache:
      cur_sources, cur_externs = depcache[dep]
    else:
      dep_sources, dep_deps, dep_externs = ParseDepList(dep)
      cur_sources, cur_externs = CrawlDepsTree(dep_deps)
      # Add child dependencies of this node before the current node, then cache.
      AppendUnique(cur_sources, dep_sources)
      AppendUnique(cur_externs, dep_externs)
      depcache[dep] = (cur_sources, cur_externs)

    # Add the current node's sources and dedupe.
    AppendUnique(new_sources, cur_sources)
    AppendUnique(new_externs, cur_externs)

  return new_sources, new_externs
Parses the dependency tree creating a post-order listing of sources.
Parses the dependency tree creating a post-order listing of sources.
Parses the dependency tree creating a post - order listing of sources .
def CrawlDepsTree(deps):
  global depcache
  if len(deps) == 0:
    return ([], [])
  new_sources = []
  new_externs = []
  for dep in deps:
    if dep in depcache:
      cur_sources, cur_externs = depcache[dep]
    else:
      dep_sources, dep_deps, dep_externs = ParseDepList(dep)
      cur_sources, cur_externs = CrawlDepsTree(dep_deps)
      AppendUnique(cur_sources, dep_sources)
      AppendUnique(cur_externs, dep_externs)
      depcache[dep] = (cur_sources, cur_externs)
    AppendUnique(new_sources, cur_sources)
    AppendUnique(new_externs, cur_externs)
  return new_sources, new_externs
def CrawlDepsTree ( deps ) : global depcache if len ( deps ) == 0 : return ( [ ] , [ ] ) new_sources = [ ] new_externs = [ ] for dep in deps : if dep in depcache : cur_sources , cur_externs = depcache [ dep ] else : dep_sources , dep_deps , dep_externs = ParseDepList ( dep ) cur_sources , cur_externs = CrawlDepsTree ( dep_deps ) AppendUnique ( cur_sources , dep_sources ) AppendUnique ( cur_externs , dep_externs ) depcache [ dep ] = ( cur_sources , cur_externs ) AppendUnique ( new_sources , cur_sources ) AppendUnique ( new_externs , cur_externs ) return new_sources , new_externs
Parses the dependency tree creating a post-order listing of sources.
Parses the dependency tree creating a post - order listing of sources .
"""Parses the dependency tree creating a post-order listing of sources.""" # Add child dependencies of this node before the current node, then cache. # Add the current node's sources and dedupe.
deps