anchor.diff:          defaultValueCode = ": ${_extractConstantCode(
               parameterNode.defaultValue,
               parameterElement.library,
  -            importCollector, logger)}";
  +            importCollector, logger, _generatedLibraryId, _resolver)}";
         }
         return "${namedParameterNames[i]}$defaultValueCode";
       }).join(", ");
  
positive.code:     Expression expression,
      LibraryElement originatingLibrary,
      _ImportCollector importCollector,
      TransformLogger logger) {
    if (expression is ListLiteral) {
      List<String> elements = expression.elements.map((Expression subExpression) {
        return _extractConstantCode(
            subExpression, originatingLibrary, importCollector, logger);
      });
      // TODO(sigurdm) feature: Type arguments.
      return "const ${_formatAsDynamicList(elements)}";
    } else if (expression is MapLiteral) {
      List<String> elements = expression.entries.map((MapLiteralEntry entry) {
        String key = _extractConstantCode(
            entry.key, originatingLibrary, importCollector, logger);
        String value = _extractConstantCode(
            entry.value, originatingLibrary, importCollector, logger);
        return "$key: $value";
      });
      // TODO(sigurdm) feature: Type arguments.
      return "const ${_formatAsMap(elements)}";
    } else if (expression is InstanceCreationExpression) {
      String constructor = expression.constructorName.toSource();
      LibraryElement libraryOfConstructor = expression.staticElement.library;
      importCollector._addLibrary(libraryOfConstructor);
      String prefix =
          importCollector._getPrefix(expression.staticElement.library);
      // TODO(sigurdm) implement: Named arguments.
      String arguments =
          expression.argumentList.arguments.map((Expression argument) {
        return _extractConstantCode(
            argument, originatingLibrary, importCollector, logger);
      }).join(", ");
      // TODO(sigurdm) feature: Type arguments.
      return "const $prefix.$constructor($arguments)";
    } else if (expression is Identifier) {
      if (Identifier.isPrivateName(expression.name)) {
        Element staticElement = expression.staticElement;
        if (staticElement is PropertyAccessorElement) {
          VariableElement variable = staticElement.variable;
          VariableDeclaration variableDeclaration = variable.computeNode();
          return _extractConstantCode(variableDeclaration.initializer,
              originatingLibrary, importCollector, logger);
        } else {
          logger.error("Cannot handle private identifier $expression");
          return "";
        }
      } else {
        Element element = expression.staticElement;
        importCollector._addLibrary(element.library);
        String prefix = importCollector._getPrefix(element.library);
        Element enclosingElement = element.enclosingElement;
        if (enclosingElement is ClassElement) {
          prefix += ".${enclosingElement.name}";
        }
        return "$prefix.${element.name}";
      }
    } else if (expression is BinaryExpression) {
      String a = _extractConstantCode(
          expression.leftOperand, originatingLibrary, importCollector, logger);
      String op = expression.operator.lexeme;
      String b = _extractConstantCode(
          expression.rightOperand, originatingLibrary, importCollector, logger);
      return "$a $op $b";
    } else if (expression is ConditionalExpression) {
      String condition = _extractConstantCode(
          expression.condition, originatingLibrary, importCollector, logger);
      String a = _extractConstantCode(
          expression.thenExpression, originatingLibrary, importCollector, logger);
      String b = _extractConstantCode(
          expression.elseExpression, originatingLibrary, importCollector, logger);
      return "$condition ? $a : $b";
    } else if (expression is ParenthesizedExpression) {
      String nested = _extractConstantCode(
          expression.expression, originatingLibrary, importCollector, logger);
      return "($nested)";
    } else if (expression is PropertyAccess) {
      String target = _extractConstantCode(
          expression.target, originatingLibrary, importCollector, logger);
      String selector = expression.propertyName.token.lexeme;
      return "$target.$selector";
    } else if (expression is MethodInvocation) {
      // We only handle "identical(a, b)".
      assert(expression.target == null);
      assert(expression.methodName.token.lexeme == "identical");
      NodeList arguments = expression.argumentList.arguments;
      assert(arguments.length == 2);
      String a = _extractConstantCode(
          arguments[0], originatingLibrary, importCollector, logger);
      String b = _extractConstantCode(
          arguments[1], originatingLibrary, importCollector, logger);
      return "identical($a, $b)";
    } else {
      assert(expression is IntegerLiteral ||
          expression is BooleanLiteral ||
          expression is StringLiteral ||
          expression is NullLiteral ||
          expression is SymbolLiteral ||
          expression is DoubleLiteral ||
          expression is TypedLiteral);
      return expression.toSource();
    }
  }
  
  /// Returns a [String] containing code that will evaluate to the same
  
negative.code:     if (parameterNode is DefaultFormalParameter &&
          parameterNode.defaultValue != null) {
        defaultValueCode = _extractConstantCode(
            parameterNode.defaultValue,
            element.library,
            importCollector,
            logger,
            _generatedLibraryId,
            _resolver);
      }
      return 'new r.ParameterMirrorImpl(r"${element.name}", $descriptor, '
          '$ownerIndex, ${_constConstructionCode(importCollector)}, '
  