tools/binary_size/libsupersize/diff.py
def _DiffContainerLists(before_containers, after_containers):
  """Computes diff of Containers lists, matching names."""
  # Find ordered unique names, preferring order of |container_after|.
  pairs = collections.OrderedDict()
  for c in after_containers:
    pairs[c.name] = [models.Container.Empty(), c]
  for c in before_containers:
    if c.name in pairs:
      pairs[c.name][0] = c
    else:
      pairs[c.name] = [c, models.Container.Empty()]
  ret = []
  for name, (before, after) in pairs.items():
    ret.append(models.DeltaContainer(name=name, before=before, after=after))
  # This update newly created diff Containers, not existing ones or EMPTY.
  models.BaseContainer.AssignShortNames(ret)
  return ret
Computes diff of Containers lists, matching names.
Computes diff of Containers lists, matching names.
Computes diff of Containers lists matching names .
def _DiffContainerLists(before_containers, after_containers):
  pairs = collections.OrderedDict()
  for c in after_containers:
    pairs[c.name] = [models.Container.Empty(), c]
  for c in before_containers:
    if c.name in pairs:
      pairs[c.name][0] = c
    else:
      pairs[c.name] = [c, models.Container.Empty()]
  ret = []
  for name, (before, after) in pairs.items():
    ret.append(models.DeltaContainer(name=name, before=before, after=after))
  models.BaseContainer.AssignShortNames(ret)
  return ret
def _DiffContainerLists ( before_containers , after_containers ) : pairs = collections . OrderedDict ( ) for c in after_containers : pairs [ c . name ] = [ models . Container . Empty ( ) , c ] for c in before_containers : if c . name in pairs : pairs [ c . name ] [ 0 ] = c else : pairs [ c . name ] = [ c , models . Container . Empty ( ) ] ret = [ ] for name , ( before , after ) in pairs . items ( ) : ret . append ( models . DeltaContainer ( name = name , before = before , after = after ) ) models . BaseContainer . AssignShortNames ( ret ) return ret
Computes diff of Containers lists, matching names.
Computes diff of Containers lists matching names .
"""Computes diff of Containers lists, matching names.""" # Find ordered unique names, preferring order of |container_after|. # This update newly created diff Containers, not existing ones or EMPTY.
before_containers
after_containers