anchor.diff:  /// will remain unresolved if they were unresolved when they were obtained.
   EvaluationResultImpl _constTopLevelVariableEvaluationResult(
       ConstTopLevelVariableElementImpl constTopLevelVariable) {
  -  // This is safe: The result returned from `library` will not be used again.
  -  _resolvedLibraryOf(constTopLevelVariable.library);
  -  return constTopLevelVariable.evaluationResult;
  -}
  -
  -/// Requests resolution of constants in [libraryElement] and returns a
  -/// [LibraryElement] wherein they have been resolved. If the library has
  -/// been obtained by evaluating `library` on an `Element` and all further
  -/// usage of that library will happen by invoking `library` again then it is
  -/// safe to ignore the returned value (because the future invocations of
  -/// `library` will return the resolved library).
  -LibraryElement _resolvedLibraryOf(LibraryElement libraryElement) {
  -  LibraryElement resolvedLibrary = _resolvedLibraries[libraryElement];
  -  if (resolvedLibrary == null) {
  -    resolvedLibrary = libraryElement.context
  -        .computeLibraryElement(libraryElement.definingCompilationUnit.source);
  -    _resolvedLibraries[libraryElement] = resolvedLibrary;
  -  }
  -  return resolvedLibrary;
  -}
  -
  -Map<LibraryElement, LibraryElement> _resolvedLibraries =
  -    <LibraryElement, LibraryElement>{};
  +  EvaluationResultImpl result = constTopLevelVariable.evaluationResult;
  +  if (result == null) {
  +    // This is safe: The `library` will not be used again.
  +    _resolvedLibraryOf(constTopLevelVariable.library);
  +    result = constTopLevelVariable.evaluationResult;
  +  }
  +  return result;
  +}
  +
  +/// Returns the result of evaluating [elementAnnotation].
  +///
  +/// Returns the result of invoking `evaluationResult` on the given
  +/// [elementAnnotation], possibly resolving constants in its enclosing
  +/// [LibraryElement]. As an exception, when [elementAnnotation] denotes
  +/// a getter or a constructor, `evaluationResult` is null; the value is
  +/// then obtained indirectly.
  +DartObjectImpl _getEvaluatedMetadatum(ElementAnnotation elementAnnotation) {
  +  fail() {
  +    throw unimplementedError(
  +        "Metadata has a not yet supported form: $elementAnnotation");
  +  }
  +
  +  EvaluationResultImpl evaluation =
  +      _annotationEvaluationResult(elementAnnotation);
  +  if (evaluation != null) return evaluation.value;
  +  // The `evaluationResult` from a getter is `null`, so we have to deal
  +  // with that case separately.
  +  Element element = elementAnnotation.element;
  +  if (element is PropertyAccessorElement &&
  +      element.isGetter &&
  +      element.isSynthetic) {
  +    PropertyInducingElement variable = element.variable;
  +    EvaluationResultImpl result;
  +    if (variable is ConstFieldElementImpl) {
  +      result = _constFieldEvaluationResult(variable);
  +    } else if (variable is ConstTopLevelVariableElementImpl) {
  +      result = _constTopLevelVariableEvaluationResult(variable);
  +    } else {
  +      throw fail();
  +    }
  +    if (result?.value == null) throw fail();
  +    return result.value;
  +  } else if (element is ConstructorElementImpl) {
  +    DartType dartType = element.returnType;
  +    if (dartType is InterfaceType) {
  +      return new DartObjectImpl.validWithUnknownValue(dartType);
  +    }
  +  }
  +  throw fail();
  +}
  +
  +/// Returns the result of evaluating [metadata].
  +///
  +/// Returns the result of evaluating each of the element annotations
  +/// in [metadata] using [_getEvaluatedMetadatum].
  +Iterable<DartObjectImpl> _getEvaluatedMetadata(
  +    Iterable<ElementAnnotation> metadata) {
  +  return metadata.map(_getEvaluatedMetadatum);
  +}
  
positive.code: /// will remain unresolved if they were unresolved when they were obtained.
  EvaluationResultImpl _annotationEvaluationResult(
      ElementAnnotationImpl annotation) {
    _resolvedLibraryOf(annotation.compilationUnit.library);
    return annotation.evaluationResult;
  }
  
  /// Returns the `evaluationResult` for [constFieldElement], after having forced
  /// constant resolution to take place in `constFieldElement.library`.
  /// Note that future invocations of `constFieldElement.library` will
  /// return a resolved library, but previously obtained results from that method
  /// will remain unresolved if they were unresolved when they were obtained.
  EvaluationResultImpl _constFieldEvaluationResult(
      ConstFieldElementImpl constFieldElement) {
    // This is safe: The result returned from `library` will not be used again.
    _resolvedLibraryOf(constFieldElement.library);
    return constFieldElement.evaluationResult;
  }
  
  /// Returns the `evaluationResult` for [constTopLevelVariable], after having
  /// forced constant resolution to take place in `constTopLevelvariable.library`.
  /// Note that future invocations of `constTopLevelVariable.library` will
  
negative.code:         if (import.importedLibrary != reflectableLibrary) continue;
          for (ElementAnnotationImpl metadatum in import.metadata) {
            if (metadatum.element == globalQuantifyCapabilityConstructor) {
              DartObjectImpl value = _getEvaluatedMetadatum(metadatum);
              if (value != null) {
                String pattern = value.fields["classNamePattern"].toStringValue();
                if (pattern == null) {
                  // TODO(sigurdm) implement: Create a span for the annotation
  