anchor.diff:    }
   
     /**
  +   * Create a new entry in the references table ([UnlinkedLibrary.references]
  +   * and [LinkedLibrary.references]) representing an entity having the given
  +   * [name] and [kind].  If [unit] is given, it is the index of the compilation
  +   * unit containing the entity being referred to.  If [prefixReference] is
  +   * given, it indicates the entry in the references table for the prefix.
  +   */
  +  int serializeUnlinkedReference(String name, ReferenceKind kind,
  +      {int unit: 0, int prefixReference: 0}) {
  +    assert(unlinkedReferences.length == linkedReferences.length);
  +    int index = unlinkedReferences.length;
  +    unlinkedReferences.add(new UnlinkedReferenceBuilder(
  +        name: name, prefixReference: prefixReference));
  +    linkedReferences.add(new LinkedReferenceBuilder(kind: kind, unit: unit));
  +    return index;
  +  }
  +
  +  /**
      * Return the index of the entry in the references table
      * ([UnlinkedLibrary.references] and [LinkedLibrary.references]) used for
      * unresolved references.  A new entry is added to the table if necessary to
  
positive.code:         } else {
            prefixReference = _getElementReferenceId(enclosing, linked: linked);
          }
          unlinkedReferences.add(new UnlinkedReferenceBuilder(
              name: name, prefixReference: prefixReference));
        }
        int index = linkedReferences.length;
        linkedReferences.add(linkedReference);
        return index;
      });
    }
  
    int _getLengthPropertyReference(int prefix) {
      assert(unlinkedReferences.length == linkedReferences.length);
      int index = linkedReferences.length;
      unlinkedReferences.add(
          new UnlinkedReferenceBuilder(name: 'length', prefixReference: prefix));
      LinkedReferenceBuilder linkedReference =
          new LinkedReferenceBuilder(kind: ReferenceKind.length);
      linkedReferences.add(linkedReference);
      return index;
    }
  }
  
  
negative.code:         unit = dependentLibrary.units.indexOf(unitElement);
          assert(unit != -1);
        }
        ReferenceKind kind = _getReferenceKind(element);
        String name = element == null ? 'void' : element.name;
        int index;
        LinkedReferenceBuilder linkedReference;
        if (linked) {
          linkedReference =
              new LinkedReferenceBuilder(kind: kind, unit: unit, name: name);
          Element enclosing = element?.enclosingElement;
          if (enclosing is ClassElement) {
            linkedReference.containingReference =
                _getElementReferenceId(enclosing, linked: linked);
            linkedReference.numTypeParameters = enclosing.typeParameters.length;
          }
          index = linkedReferences.length;
          linkedReferences.add(linkedReference);
        } else {
          assert(unlinkedReferences.length == linkedReferences.length);
          int prefixReference = 0;
  